Skip to content

Commit 080a6ec

Browse files
author
Stanislav Idolov
authored
ENGCOM-1514: Issue 14351: Product import doesn't change Enable Qty Increments field #14352
2 parents 557c3d1 + 58dd07a commit 080a6ec

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
@@ -10,6 +10,7 @@
1010
use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor;
1111
use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor;
1212
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
13+
use Magento\CatalogInventory\Api\Data\StockItemInterface;
1314
use Magento\CatalogImportExport\Model\StockItemImporterInterface;
1415
use Magento\Framework\App\Filesystem\DirectoryList;
1516
use Magento\Framework\App\ObjectManager;
@@ -2618,7 +2619,10 @@ private function _setStockUseConfigFieldsValues($rowData)
26182619
{
26192620
$useConfigFields = [];
26202621
foreach ($rowData as $key => $value) {
2621-
$useConfigName = self::INVENTORY_USE_CONFIG_PREFIX . $key;
2622+
$useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS
2623+
? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC
2624+
: self::INVENTORY_USE_CONFIG_PREFIX . $key;
2625+
26222626
if (isset($this->defaultStockData[$key])
26232627
&& isset($this->defaultStockData[$useConfigName])
26242628
&& !empty($value)

0 commit comments

Comments
 (0)