Skip to content

Commit 637979f

Browse files
committed
Using constants for qty increments in product import
1 parent 54507a7 commit 637979f

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
@@ -9,6 +9,7 @@
99
use Magento\Catalog\Model\Product\Visibility;
1010
use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor;
1111
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
12+
use Magento\CatalogInventory\Api\Data\StockItemInterface;
1213
use Magento\Framework\App\Filesystem\DirectoryList;
1314
use Magento\Framework\Exception\LocalizedException;
1415
use Magento\Framework\Filesystem;
@@ -2580,8 +2581,8 @@ private function _setStockUseConfigFieldsValues($rowData)
25802581
{
25812582
$useConfigFields = [];
25822583
foreach ($rowData as $key => $value) {
2583-
$useConfigName = $key === 'enable_qty_increments'
2584-
? 'use_config_enable_qty_inc'
2584+
$useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS
2585+
? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC
25852586
: self::INVENTORY_USE_CONFIG_PREFIX . $key;
25862587

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

0 commit comments

Comments
 (0)