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 May 1, 2018
1 parent 1268692 commit 16b8b2c
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 @@ -10,6 +10,7 @@
use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor;
use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
use Magento\CatalogInventory\Api\Data\StockItemInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Exception\LocalizedException;
Expand Down Expand Up @@ -2636,8 +2637,8 @@ private function _setStockUseConfigFieldsValues($rowData)
{
$useConfigFields = [];
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 16b8b2c

Please sign in to comment.