From 16b8b2c206e06945f2aa884e454bf2a4d832ee68 Mon Sep 17 00:00:00 2001 From: Sergey 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 502c5ce01f592..56595cf42f018 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -10,6 +10,7 @@ use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor; use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor; use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface; +use Magento\CatalogInventory\Api\Data\StockItemInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\LocalizedException; @@ -2636,8 +2637,8 @@ private function _setStockUseConfigFieldsValues($rowData) { $useConfigFields = []; 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])