Now we have \Magento\CatalogInventory\Model\ResourceModel\Stock\Status::addStockDataToCollection
This functionality works only with single stock system
Need to adapt this functionality for proper work with MSI
Proposed steps:
- Create around plugin on
\Magento\CatalogInventory\Model\ResourceModel\Stock\Status::addStockDataToCollection in
Magento\InventoryCatalog\Plugin\CatalogInventory\StockStatusResourceModel
- Use
\Magento\InventorySalesApi\Api\StockResolverInterface for resolving current stock
- Join proper table from new MSI index tables
- Create integration tests: check work with default stock (use
source_items_on_default_source fixture) and for some custom stock
Fields(columns in SELECT) names must be compatible with legacy names
Now we have
\Magento\CatalogInventory\Model\ResourceModel\Stock\Status::addStockDataToCollectionThis functionality works only with single stock system
Need to adapt this functionality for proper work with MSI
Proposed steps:
\Magento\CatalogInventory\Model\ResourceModel\Stock\Status::addStockDataToCollectioninMagento\InventoryCatalog\Plugin\CatalogInventory\StockStatusResourceModel\Magento\InventorySalesApi\Api\StockResolverInterfacefor resolving current stocksource_items_on_default_sourcefixture) and for some custom stockFields(columns in SELECT) names
mustbe compatible with legacy names