Full context in documentation
[HLD] Inconsistent saving of Stock Data
Description
Currently, the product form sends data to the server in two keys:
- stock_data
- quantity_and_stock_status
After refactoring, the form should send data in a single field.
The best way is to keep the data consistent with Magento WebAPI:
[
ProductInterface::EXTENSION_ATTRIBUTES_KEY => [
'stock_item' => [
StockItemInterface::QTY => 1000,
StockItemInterface::IS_IN_STOCK => true,
...
],
]
You will also need to update:
- \Magento\CatalogInventory\Ui\DataProvider\Product\Form\Modifier\AdvancedInventory::modifyData
Full context in documentation
[HLD] Inconsistent saving of Stock Data
Description
Currently, the product form sends data to the server in two keys:
After refactoring, the form should send data in a single field.
The best way is to keep the data consistent with Magento WebAPI:
[ ProductInterface::EXTENSION_ATTRIBUTES_KEY => [ 'stock_item' => [ StockItemInterface::QTY => 1000, StockItemInterface::IS_IN_STOCK => true, ... ], ]You will also need to update: