Skip to content

Commit 053fea2

Browse files
committed
Using constants for qty increments in product import
1 parent ead41d9 commit 053fea2

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
@@ -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,8 +2550,8 @@ private function _setStockUseConfigFieldsValues($rowData)
25492550
{
25502551
$useConfigFields = array();
25512552
foreach ($rowData as $key => $value) {
2552-
$useConfigName = $key === 'enable_qty_increments'
2553-
? 'use_config_enable_qty_inc'
2553+
$useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS
2554+
? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC
25542555
: self::INVENTORY_USE_CONFIG_PREFIX . $key;
25552556

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

0 commit comments

Comments
 (0)