Skip to content

Refactor the Product form #14

@naydav

Description

@naydav

Full context in documentation

[HLD] Inconsistent saving of Stock Data

Description

Currently, the product form sends data to the server in two keys:

  1. stock_data
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions