Add import description
modifié: core/lib/Thelia/Config/Resources/import.xml modifié: core/lib/Thelia/ImportExport/Import/Type/ProductStockImport.php modifié: templates/backOffice/default/ajax/export-modal.html modifié: templates/backOffice/default/ajax/import-modal.html modifié: templates/backOffice/default/export-page.html modifié: templates/backOffice/default/export.html modifié: templates/backOffice/default/import-page.html modifié: templates/backOffice/default/import.html
This commit is contained in:
@@ -14,18 +14,67 @@
|
||||
<import id="thelia.import.stock" class="Thelia\ImportExport\Import\Type\ProductStockImport" category_id="thelia.import.products">
|
||||
<import_descriptive locale="fr_FR">
|
||||
<title>Importez votre stock</title>
|
||||
<description>
|
||||
<![CDATA[
|
||||
Your file must have the following columns to work:
|
||||
<ul>
|
||||
<li>ref: The reference of your product Attribute Combinations </li>
|
||||
<li>stock: The quantity of product you have </li>
|
||||
</ul>
|
||||
]]>
|
||||
</description>
|
||||
</import_descriptive>
|
||||
<import_descriptive locale="en_US">
|
||||
<title>Import your stock</title>
|
||||
<description>
|
||||
<![CDATA[
|
||||
Your file must have the following columns to work:
|
||||
<ul>
|
||||
<li>ref: The reference of your product attribute combinations </li>
|
||||
<li>stock: The quantity of product you have </li>
|
||||
</ul>
|
||||
It can have the column "ean" that defines the product's EAN code.
|
||||
]]>
|
||||
</description>
|
||||
</import_descriptive>
|
||||
</import>
|
||||
|
||||
<import id="thelia.import.price" class="Thelia\ImportExport\Import\Type\ProductPricesImport" category_id="thelia.import.products">
|
||||
<import_descriptive locale="fr_FR">
|
||||
<title>Importez vos prix Hors-Taxes</title>
|
||||
<description>
|
||||
<![CDATA[
|
||||
Votre fichier doit avoir les colonnes suivantes:
|
||||
<ul>
|
||||
<li>ref: La reférénce de votre déclinaison de combinaison de produit</li>
|
||||
<li>price: Le prix Hors-Taxes de votre déclinaison de combinaison de produit</li>
|
||||
</ul>
|
||||
Il peut aussi optionnellement avoir ces colonnes:
|
||||
<ul>
|
||||
<li>currency: Le code de la monnaie (exemple: EUR, USD)</li>
|
||||
<li>promo_price: Le prix promotionnel Hors-Taxes de votre déclinaison de combinaison de produit</li>
|
||||
<li>promo: Si cette valeur est a 0, désactive la promotion, si elle est a 1, l'active</li>
|
||||
</ul>
|
||||
]]>
|
||||
</description>
|
||||
</import_descriptive>
|
||||
<import_descriptive locale="en_US">
|
||||
<title>Import your prices excluding taxes</title>
|
||||
<description>
|
||||
<![CDATA[
|
||||
Your file must have the following columns:
|
||||
<ul>
|
||||
<li>ref: The reference of the product attribute combinations</li>
|
||||
<li>price: The price excluding taxes of the product attribute combinations</li>
|
||||
</ul>
|
||||
It may also optionally have those columns:
|
||||
<ul>
|
||||
<li>currency: the currency code (example: EUR, USD)</li>
|
||||
<li>promo_price: the promo price excluding taxes of the product attribute combinations</li>
|
||||
<li>promo: If this value is 0, set the product not in promo, if 1, it sets the product in promo</li>
|
||||
</ul>
|
||||
]]>
|
||||
</description>
|
||||
</import_descriptive>
|
||||
</import>
|
||||
</imports>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
namespace Thelia\ImportExport\Import\Type;
|
||||
use Thelia\Core\FileFormat\Formatting\FormatterData;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Core\FileFormat\FormatType;
|
||||
use Thelia\ImportExport\Import\ImportHandler;
|
||||
use Thelia\Model\ProductSaleElementsQuery;
|
||||
@@ -24,8 +23,6 @@ use Thelia\Model\ProductSaleElementsQuery;
|
||||
*/
|
||||
class ProductStockImport extends ImportHandler
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @param \Thelia\Core\FileFormat\Formatting\FormatterData
|
||||
* @return string|array error messages
|
||||
@@ -52,11 +49,13 @@ class ProductStockImport extends ImportHandler
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$obj
|
||||
->setQuantity($row["stock"])
|
||||
->setEanCode($row["ean"])
|
||||
->save()
|
||||
;
|
||||
$obj->setQuantity($row["stock"]);
|
||||
|
||||
if (isset($row["ean"]) && !empty($row["ean"])) {
|
||||
$obj->setEanCode($row["ean"]);
|
||||
}
|
||||
|
||||
$obj->save();
|
||||
$this->importedRows++;
|
||||
}
|
||||
}
|
||||
@@ -66,7 +65,7 @@ class ProductStockImport extends ImportHandler
|
||||
|
||||
protected function getMandatoryColumns()
|
||||
{
|
||||
return ["ref", "stock", "ean"];
|
||||
return ["ref", "stock"];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user