Skip to content

Commit 871f934

Browse files
author
Stanislav Idolov
authored
ENGCOM-2303: [Backport 2.1] Issue 14351: Product import doesn't change Enable Qty Increments field #14380
2 parents aa78f42 + 49a9966 commit 871f934

File tree

1 file changed

+5
-1
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+5
-1
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace Magento\CatalogImportExport\Model\Import;
1010

11+
use Magento\CatalogInventory\Api\Data\StockItemInterface;
1112
use Magento\Framework\App\Filesystem\DirectoryList;
1213
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
1314
use Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface;
@@ -2549,7 +2550,10 @@ private function _setStockUseConfigFieldsValues($rowData)
25492550
{
25502551
$useConfigFields = array();
25512552
foreach ($rowData as $key => $value) {
2552-
$useConfigName = self::INVENTORY_USE_CONFIG_PREFIX . $key;
2553+
$useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS
2554+
? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC
2555+
: self::INVENTORY_USE_CONFIG_PREFIX . $key;
2556+
25532557
if (isset($this->defaultStockData[$key])
25542558
&& isset($this->defaultStockData[$useConfigName])
25552559
&& !empty($value)

0 commit comments

Comments
 (0)