Skip to content

Commit

Permalink
ENGCOM-2303: [Backport 2.1] Issue 14351: Product import doesn't chang…
Browse files Browse the repository at this point in the history
…e \`Enable Qty Increments\` field magento#14380

 - Merge Pull Request magento#14380 from simpleadm/magento2:backport/2.1-fix-product-import-enable-qty-inc
 - Merged commits:
   1. ead41d9
   2. 053fea2
  • Loading branch information
magento-engcom-team committed Jul 12, 2018
2 parents 2b53bf2 + 053fea2 commit 49a9966
Showing 1 changed file with 5 additions and 1 deletion.
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,7 +2550,10 @@ private function _setStockUseConfigFieldsValues($rowData)
{
$useConfigFields = array();
foreach ($rowData as $key => $value) {
$useConfigName = self::INVENTORY_USE_CONFIG_PREFIX . $key;
$useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS
? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC
: self::INVENTORY_USE_CONFIG_PREFIX . $key;

if (isset($this->defaultStockData[$key])
&& isset($this->defaultStockData[$useConfigName])
&& !empty($value)
Expand Down

0 comments on commit 49a9966

Please sign in to comment.