diff --git a/core/lib/Thelia/Config/Resources/import.xml b/core/lib/Thelia/Config/Resources/import.xml index 84dcbf9e1..4a57d7da8 100644 --- a/core/lib/Thelia/Config/Resources/import.xml +++ b/core/lib/Thelia/Config/Resources/import.xml @@ -14,18 +14,67 @@ Importez votre stock + + +
  • ref: The reference of your product Attribute Combinations
  • +
  • stock: The quantity of product you have
  • + + ]]> +
    Import your stock + + +
  • ref: The reference of your product attribute combinations
  • +
  • stock: The quantity of product you have
  • + + It can have the column "ean" that defines the product's EAN code. + ]]> +
    Importez vos prix Hors-Taxes + + +
  • ref: La reférénce de votre déclinaison de combinaison de produit
  • +
  • price: Le prix Hors-Taxes de votre déclinaison de combinaison de produit
  • + + Il peut aussi optionnellement avoir ces colonnes: +
      +
    • currency: Le code de la monnaie (exemple: EUR, USD)
    • +
    • promo_price: Le prix promotionnel Hors-Taxes de votre déclinaison de combinaison de produit
    • +
    • promo: Si cette valeur est a 0, désactive la promotion, si elle est a 1, l'active
    • +
    + ]]> +
    Import your prices excluding taxes + + +
  • ref: The reference of the product attribute combinations
  • +
  • price: The price excluding taxes of the product attribute combinations
  • + + It may also optionally have those columns: +
      +
    • currency: the currency code (example: EUR, USD)
    • +
    • promo_price: the promo price excluding taxes of the product attribute combinations
    • +
    • promo: If this value is 0, set the product not in promo, if 1, it sets the product in promo
    • +
    + ]]> +
    diff --git a/core/lib/Thelia/ImportExport/Import/Type/ProductStockImport.php b/core/lib/Thelia/ImportExport/Import/Type/ProductStockImport.php index 6e9d179f0..870c18e62 100644 --- a/core/lib/Thelia/ImportExport/Import/Type/ProductStockImport.php +++ b/core/lib/Thelia/ImportExport/Import/Type/ProductStockImport.php @@ -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"]; } /** diff --git a/templates/backOffice/default/ajax/export-modal.html b/templates/backOffice/default/ajax/export-modal.html index 178fe2bbf..efd0931e0 100644 --- a/templates/backOffice/default/ajax/export-modal.html +++ b/templates/backOffice/default/ajax/export-modal.html @@ -9,6 +9,15 @@