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 54507a7 commit 637979f
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 @@ -9,6 +9,7 @@
use Magento\Catalog\Model\Product\Visibility;
use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
use Magento\CatalogInventory\Api\Data\StockItemInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem;
Expand Down Expand Up @@ -2580,8 +2581,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 637979f

Please sign in to comment.