Skip to content

Commit

Permalink
ENGCOM-1514: Issue 14351: Product import doesn't change \`Enable Qty …
Browse files Browse the repository at this point in the history
…Increments\` field #14352

 - Merge Pull Request #14352 from simpleadm/magento2:fix-product-import-enable-qty-inc
 - Merged commits:
   1. 1268692
   2. 16b8b2c
   3. cb83575
  • Loading branch information
magento-engcom-team committed Jun 22, 2018
2 parents 70c5c51 + cb83575 commit 58dd07a
Showing 1 changed file with 5 additions and 1 deletion.
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\CatalogImportExport\Model\StockItemImporterInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\App\ObjectManager;
Expand Down Expand Up @@ -2618,7 +2619,10 @@ private function _setStockUseConfigFieldsValues($rowData)
{
$useConfigFields = [];
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 58dd07a

Please sign in to comment.