Skip to main content
Share Your Experience: Take the 2024 Developer Survey
28 votes

How to disable the MSI in Magento 2.3?

There are 3 options: Option 1 - Disable via module:disable This command will list and disable all the MSI modules. php bin/magento module:status | grep Magento_Inventory | grep -v List | grep -v None |...
Rafael Corrêa Gomes's user avatar
22 votes

Magento 2 - Cant buy product - "There are no source items with the in stock status"

DO NOT WORRY IF YOU HAVE PRODUCTS OR ORDERS IN YOUR DB, THIS IS SAFE and TESTED. Whenever we will upgrade magento 2.3.X version to magento 2.4.3 at that time Multi Source Inventory Issue happens. To ...
Darshan modi's user avatar
  • 1,071
21 votes

How to disable the MSI in Magento 2.3?

To disable the MSI it's best to do it from command line by running this command in the magento root: php bin/magento module:disable -f Magento_Inventory Magento_InventoryAdminUi Magento_InventoryApi ...
Abude's user avatar
  • 322
14 votes
Accepted

Magento 2.3 Delete Inventory Source

Magento Sources Sources represent locations storing and shipping available product stock. Any location with available stock and capable of order fulfillment can be added as a source. These locations ...
Muhammad Hasham's user avatar
9 votes

product not saving after upgrading to Magento 2.3

Simple solution if you are not planning to use MSI you can simply disable all modules related to it by using below php bin/magento module:disable -f Magento_Inventory Magento_InventoryAdminUi ...
anonymous's user avatar
  • 3,752
6 votes
Accepted

Magento 2.3 : Getting qty from all assigned sources (Multi warehouse inventory) programmatically

$sourceItemsBySku = $this->getSourceItemsBySku->execute($product->getSku()); $config['stockData'][$productId] = []; foreach ($sourceItemsBySku as $sourceItem) { $source = $sourceItem->...
Tomasz Kuter's user avatar
6 votes
Accepted

Magento 2 - Cant buy product - "There are no source items with the in stock status"

I figured it out, I have to open all simple products which are connected to the configurable product, then go to "Advanced Inventory" and check the checkbox 'Use Config Settings' under "Manage Stock"
Black's user avatar
  • 3,369
6 votes
Accepted

How to get in stock product collection by category id in Magento 2.3.3?

To get instock product collection. include catalogInventory stock helper class protected $stockFilter; public function __construct( \Magento\Catalog\Model\Product\Visibility $...
Manish Chaubey's user avatar
6 votes
Accepted

Magento2.4 API - Update product inventory for multiple sources (MSI)

You can update the stock in MSI like this: Bulk update products' inventory by using the POST /rest/default/async/bulk/V1/inventory/source-items (you will need your rabbitmq connection configured for ...
Diana's user avatar
  • 5,182
5 votes
Accepted

Magento 2 : How to get collection of all sources "MSI (multi source inventory)?

Try following way: use Magento\Framework\Api\SearchCriteriaBuilderFactory; use Magento\InventoryApi\Api\SourceRepositoryInterface; /** * @var SourceRepositoryInterface */ private $sourceRepository;...
Sohel Rana's user avatar
  • 35.9k
4 votes

Disable stock check / decrease when shipping an order in Magento 2.3.1

~Update ~ Crim is correct. The solution is to disable Magento MSI completely. This is what I ended up doing in my case and works. You're not the only retailer with this issue. After spending some ...
MetalMonkey's user avatar
4 votes
Accepted

Magento 2 how to get Multi source inventory names website wise?

I did below as a solution: use Magento\Inventory\Model\ResourceModel\Source\Collection as InventoryCollection; use Magento\Framework\Api\SortOrderBuilder; use Magento\InventoryApi\Api\...
Utsav Gupta's user avatar
  • 1,243
3 votes
Accepted

Filter product collection with source

you no need to use Product collection for the purposes you mentioned. You can apply filtering on the level of SourceItemRepository (\Magento\InventoryApi\Api\SourceItemRepositoryInterface::getList) ...
Igor Minyaylo's user avatar
3 votes
Accepted

Magento 2 MSI - How to listen the event of all source item stock update API

Add an after plugin to \Magento\InventoryApi\Api\SourceItemsSaveInterface::execute API
Igor Minyaylo's user avatar
3 votes

Disable stock check / decrease when shipping an order in Magento 2.3.1

The solution was to disable Magento MSI completely. https://www.mexbs.com/magento-blog/disabling-the-magento-msi/
Crim's user avatar
  • 131
3 votes

Magento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?

Try this code. It worked for me. use Magento\Framework\Api\SearchCriteriaBuilderFactory; use Magento\InventoryApi\Api\SourceRepositoryInterface; /** * @var SourceRepositoryInterface */ private $...
Keval Kadia's user avatar
3 votes

Magento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?

Try this, it's working for me. global $objectManager; $sourceList = $objectManager->get('\Magento\Inventory\Model\ResourceModel\Source\Collection'); $sourceListArr = $sourceList->load(); $i=...
Rahul Yadav 633's user avatar
3 votes

Assign Inventory source while programmatically creating product

Can you please set stock data this way in Magento 2.3 Also please inject product and productRepository like following $_product->setStockData( [ 'use_config_manage_stock' => 0, ...
Aasim Goriya's user avatar
  • 5,454
3 votes

Magento 2 - Cant buy product - "There are no source items with the in stock status"

We observed a similar issue when we sync the inventory from external custom methods. There are some instances the data is invalid only for some products. If this is external inventory import an ad-hoc ...
Dilhan Maduranga's user avatar
3 votes

Magento 2 - Cant buy product - "There are no source items with the in stock status"

If none of the other solutions are working, check your database table inventory_source_item. If all the products have a status of 0 then update them to 1 and see if that helps. UPDATE `...
David Wurst's user avatar
3 votes

I have to disable the MSI and enable the usual qty field only in the magento 2.3.5 version

2.3 introduced a view table Run this on your db CREATE OR REPLACE VIEW `inventory_stock_1` AS select distinct `legacy_stock_status`.`product_id` AS `product_id`, `legacy_stock_status`.`...
Dominic Pixie's user avatar
3 votes

Magento 2 MSI Get Product's Inventory Location/wareshouse on frontend

you can use \Magento\InventoryApi\Api\SourceItemRepositoryInterface class with \Magento\Framework\Api\SearchCriteriaBuilder to get source item data by source code and product SKU. Here are the sample ...
Gohil Rajesh's user avatar
  • 2,922
2 votes

product not saving after upgrading to Magento 2.3

Try to change the search engine value in the admin configuration by following the below steps Choose Stores-> Configuration -> Catalog -> Catalog Search Choose MYSQL value in the Search ...
saravanavelu's user avatar
  • 3,951
2 votes

Magento 2.3 : Getting qty from all assigned sources (Multi warehouse inventory) programmatically

You need to use Source Item management APIs: https://devdocs.magento.com/guides/v2.3/rest/modules/inventory/manage-source-items.html For example, to retrieve all Quantities among all Sources where ...
Igor Minyaylo's user avatar
2 votes
Accepted

Install Magento 2.3 without multisource inventory

Is there some particular reason why do you want to install Magento 2.3 without MSI? Because MSI it's not just Multi-Sourcing, but it's a brand new Inventory mechanism which in 2.4 will fully ...
Igor Minyaylo's user avatar
2 votes
Accepted

magento 2 create shipment programmatically with inventory source selection

This depends on your seller's logic for fairly simple logic where only 1 source is assigned to each website and no fallback is required try { $orderShipment->getExtensionAttributes(...
Christos Polychronis's user avatar
2 votes
Accepted

Magento 2 issue on category page and product page of "inventory_stock_1" table?

I have found after debug and research we need to run query on database. ALTER DEFINER=user@localhost VIEW inventory_stock_1 AS select distinct legacy_stock_status.product_id AS product_id,...
Magento Dev's user avatar
  • 1,264
2 votes

Magento 2.3 Delete Inventory Source

While Muhammad Hasham’s answer gives a bit of context, it doesn’t explain why this action is disabled and how to do it anyway if it’s absolutely necessary. According to the documentation: To ensure ...
bfontaine's user avatar
  • 120
2 votes

Magento 2 - Cant buy product - "There are no source items with the in stock status"

I also got the "There are no source items with the in stock status" and "This product is out of stock" messages but in my case it was because the simple product was set to "...
LauraPB's user avatar
  • 21
2 votes

Magento 2.3.2 Inventory Reservation, adding entries for open order before inventory upgrade

Maybe you had fixed this, if not check the CLI commands to check and resolve reservation inconsistencies. https://github.com/magento/inventory/wiki/CLI-Reference
aodreman's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible