Magento – Magento 2 How to decrease product qty from source same as “Product Salable qty” after orderd placed to make product out of stock

inventorymagento2msiordersproduct

As Magento 2.3 have default behavior that it decreases the qty from "Product Salable Quantity" after order placed not the "Source inventory". The main qty(source inventory) of a product is decreased after the order is completed.

I have multiple stores in my setup and I am using multisource inventory.

I have created 2 stocks from "Stores => Stocks" with
– default
– demo stocks

Created 3 sources as well from "Stores => Sources".
– Src1
– Src2
– Src3

i.e. If we have a product name XYZ and it has qty 1. when an order is placed then "Product Salable Quantity" is decreased and it is 0 but the "Source inventory" still showing qty 1 and out of stock.

in this case, the product is showing on the category page as "In Stock" but when we go to the product page it is showing "Out of Stock".

How can we update the qty(source inventory) for a product so it will become "out of stock" and don't display on the category page?

Or how can we disable this kind of products from category pages?

If anyone has an idea please let us know?

enter image description here

enter image description here

Best Answer

This is by design behavior as on the Category and Search Result pages Magento does not apply Inventory Reservations which are created when Order is placed. This is done to get the maximum performance on the category page. The product will disappear from the Category page as soon as you complete the order and create a shipment, that would lead to Source deduction and re-calculation of Stock Quantity

Related Topic