Skip to content

Commit 16b8b2c

Browse files
committed
Using constants for qty increments in product import
1 parent 1268692 commit 16b8b2c

File tree

1 file changed

+3
-2
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
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\Framework\App\Filesystem\DirectoryList;
1415
use Magento\Framework\App\ObjectManager;
1516
use Magento\Framework\Exception\LocalizedException;
@@ -2636,8 +2637,8 @@ private function _setStockUseConfigFieldsValues($rowData)
26362637
{
26372638
$useConfigFields = [];
26382639
foreach ($rowData as $key => $value) {
2639-
$useConfigName = $key === 'enable_qty_increments'
2640-
? 'use_config_enable_qty_inc'
2640+
$useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS
2641+
? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC
26412642
: self::INVENTORY_USE_CONFIG_PREFIX . $key;
26422643

26432644
if (isset($this->defaultStockData[$key])

0 commit comments

Comments
 (0)