Skip to content

Commit

Permalink
Using constants for qty increments in product import
Browse files Browse the repository at this point in the history
  • Loading branch information
simpleadm committed Jul 10, 2018
1 parent ead41d9 commit 053fea2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/code/Magento/CatalogImportExport/Model/Import/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace Magento\CatalogImportExport\Model\Import;

use Magento\CatalogInventory\Api\Data\StockItemInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
use Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface;
Expand Down Expand Up @@ -2549,8 +2550,8 @@ private function _setStockUseConfigFieldsValues($rowData)
{
$useConfigFields = array();
foreach ($rowData as $key => $value) {
$useConfigName = $key === 'enable_qty_increments'
? 'use_config_enable_qty_inc'
$useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS
? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC
: self::INVENTORY_USE_CONFIG_PREFIX . $key;

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

0 comments on commit 053fea2

Please sign in to comment.