liquidlab-agency / magento2-msi-removal
Removes Magento Multi-Source Inventory (MSI) and keeps configurable, bundle and grouped products in stock while their children are
Package info
github.com/liquidlab-agency/magento2-msi-removal
Type:magento2-module
pkg:composer/liquidlab-agency/magento2-msi-removal
Requires
- php: ~8.1.0||~8.2.0||~8.3.0||~8.4.0
- magento/framework: ^103.0.5
- magento/module-bundle: ^101.0.5
- magento/module-catalog: ^104.0.5
- magento/module-catalog-inventory: ^100.4.5
- magento/module-configurable-product: ^100.4.5
- magento/module-grouped-product: ^100.4.5
- yireo/magento2-replace-inventory: ^4.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-16 15:29:49 UTC
README
Removes Magento's Multi-Source Inventory (MSI) and keeps configurable, bundle and grouped products in stock
while their children are (Liquidlab_MsiRemoval).
Require this package, not yireo/magento2-replace-inventory directly, whenever a project removes MSI. It pulls
in the replace package and brings back the parent stock behaviour that MSI provided. Without it, a configurable
can stay out of stock after its sizes are restocked.
Features
- Removes every MSI package through
yireo/magento2-replace-inventory(4.x, Magento Open Source 2.4). - Re-checks the configurable, bundle and grouped parents after every stock item save, not only after a
product save. That includes
PUT /V1/products/{sku}/stockItems/{itemId}(ERP stock syncs) and order and credit memo stock changes.- MSI did this in
UpdateSourceItemAtLegacyStockItemSavePlugin. - Without MSI, core runs
ChangeParentStockStatusonly fromSaveInventoryDataObserver, the mass attribute update and the importer.
- MSI did this in
- Reindexes a product's price right after its stock status changes, also when the price indexer runs on
Update by Schedule. The price indexer takes the product's configurable, bundle and grouped parents with it.
- Core asks for this reindex without forcing it, which does nothing while the indexer is scheduled, and no
mview trigger covers stock items. MSI forced it in
PriceIndexUpdateProcessor. - With Display Out of Stock Products off, Magento drops out-of-stock products from the price index. Without the forced reindex, a restocked product comes back in stock with no price. Category pages then show fewer products than they count, and Elasticsuite's price high to low sort puts these products first, which can empty the first pages.
- Only a change of Stock Status or Manage Stock triggers it, read from the saved stock item before and after the save. Qty updates that keep the status, which most ERP syncs are, reindex nothing.
- Core asks for this reindex without forcing it, which does nothing while the indexer is scheduled, and no
mview trigger covers stock items. MSI forced it in
- Replaces core's
updateStockChangedAutoplugin. Core marks every out-of-stock save of a configurable as set by hand, so a sold-out configurable that is re-saved in the admin (a new colour, a new description) never comes back in stock. This module marks it as set by hand only when someone switches it from In Stock to Out of Stock. MSI disabled the core plugin instead, which also undid statuses set by hand. - The re-check and the price reindex run after the stock item's transaction commits. A rolled-back save doesn't trigger them, and a failure is logged, never thrown into a checkout or an API call.
Installation
composer require liquidlab-agency/magento2-msi-removal
php bin/magento setup:upgrade
If the project already requires yireo/magento2-replace-inventory, drop that line; this package requires it.
Requires Magento Open Source 2.4.5 or later.
Behaviour to know
- A parent goes out of stock when its last child does and comes back when a child does. A configurable switched to Out of Stock by hand stays out of stock until someone switches it back.
- Parents already stuck before installing (out of stock while a child is in stock) are fixed by the next stock update of one of their children if Magento had switched them off. Parents switched off by hand, including the ones re-saved in the admin before installing, need setting to In Stock once.
- Products that lost their price row before you upgraded stay without one until a full price reindex. Run
php bin/magento indexer:reindex catalog_product_price catalogsearch_fulltextonce after upgrading.
License
MIT, see LICENSE.txt.