From 053fea21816b022dc5ed04845612594a1ce7a537 Mon Sep 17 00:00:00 2001 From: Sergey <simpleadm@gmail.com> Date: Tue, 1 May 2018 07:07:44 +0300 Subject: [PATCH] Using constants for qty increments in product import --- .../Magento/CatalogImportExport/Model/Import/Product.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 9ad52dda32547..52e340cc45f56 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -8,6 +8,7 @@ namespace Magento\CatalogImportExport\Model\Import; +use Magento\CatalogInventory\Api\Data\StockItemInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface; use Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface; @@ -2549,8 +2550,8 @@ private function _setStockUseConfigFieldsValues($rowData) { $useConfigFields = array(); foreach ($rowData as $key => $value) { - $useConfigName = $key === 'enable_qty_increments' - ? 'use_config_enable_qty_inc' + $useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS + ? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC : self::INVENTORY_USE_CONFIG_PREFIX . $key; if (isset($this->defaultStockData[$key])