-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 14351: Product import doesn't change Enable Qty Increments
field
#14352
Issue 14351: Product import doesn't change Enable Qty Increments
field
#14352
Conversation
@@ -2636,7 +2636,10 @@ private function _setStockUseConfigFieldsValues($rowData) | |||
{ | |||
$useConfigFields = []; | |||
foreach ($rowData as $key => $value) { | |||
$useConfigName = self::INVENTORY_USE_CONFIG_PREFIX . $key; | |||
$useConfigName = $key === 'enable_qty_increments' | |||
? 'use_config_enable_qty_inc' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest using the static definition instead of the hardcoded 'enable_qty_increments' value.
Magento\CatalogInventory\Api\Data\StockItemInterface::ENABLE_QTY_INCREMENTS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for suggestion, it makes sense.
I thought about it, but ignored in favor of consistency, e.g. \Magento\CatalogImportExport\Model\Import\Product::$defaultStockData
doesn't use constants etc.
Any way, suggested changes were implemented.
Hi @simpleadm. There's a merge conflict in one of the files. Please, merge the updated 2.3-develop branch into your branch, resolve conflicts and push once again. Thank you |
Hi @rogyar , |
@magento-engcom-team any updates? |
Hi @simpleadm. Thank you for your contribution. |
Product import doesn't change
Enable Qty Increments
fieldDescription
\Magento\CatalogImportExport\Model\Import\Product::_setStockUseConfigFieldsValues
method rely on Use Config Settings property name will be withuse_config_
prefix, but forenable_qty_increments
filed it is named asuse_config_enable_qty_inc
.Fixed Issues (if relevant)
Enable Qty Increments
field #14351: Product import doesn't changeEnable Qty Increments
fieldSteps to reproduce
SKU
Quantity
,Stock Status
and required fieldsEnable Qty Increments
('Advanced Inventory') marked asUse Config Settings
System > Data transfer: Import > Import products
Example files
Contribution checklist