inventory
inventory copied to clipboard
Product having zero salable quantity results in stock in product list page and out of stock in view page.
Preconditions (*)
- Magento 2.3.5-p1(MSI enabled)
Steps to reproduce (*)
- Create a simple product with qty = 1
- Place an order that will cause the product to have 0 salable quantity
- The Salable Quantity drops to zero, while the Quantity remains at 1.
Expected result (*)
- The product, having Salable Quantity 0, should display out of stock label in both product list page and product view page.
Actual result (*)
- The product remains in stock in product list page and out of stock in view page.
P.S. If you open the product page then it does show correctly as out of stock product.
admin panel stock

product list page
product view page

Hi @ajijshekh123. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
-
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is validwill be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is validappears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Descriptionlabel to the issue by yourself. -
[ ] 3. Add
Component: XXXXXlabel(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.4-developbranchDetails
- Add the comment@magento give me 2.4-develop instanceto deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-developbranch, please, add the labelReproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 5. Add label
Issue: Confirmedonce verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@ajijshekh123 @m2-assistant any updates...
@magento give me 2.4-develop instance
Hi @ajijshekh123. Thank you for your request. I'm working on Magento 2.4-develop instance for you
Hi @ajijshekh123, here is your Magento instance.
Admin access: https://i-28325-2-4-develop.instances.magento-community.engineering/admin_e319
Login: b3dbe885 Password: da1af70eb12a
Instance will be terminated in up to 3 hours.
Hi Sir, Can give me the ticket of Dev commit. Thanks
Hi @swathishs. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
-
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is validwill be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is validappears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Descriptionlabel to the issue by yourself. -
[ ] 3. Add
Component: XXXXXlabel(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.4-developbranchDetails
- Add the comment@magento give me 2.4-develop instanceto deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-developbranch, please, add the labelReproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 5. Add label
Issue: Confirmedonce verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @maharzan86,2 all issue specific for MSI should be reported in the MSI repo
fyi: @sidolov @smoskaluk @sdzhepa
It seems this issue MSI specific and should be fixed in the MSI repository.
EngCom team, please confirm and transfer this issue to the https://github.com/magento/inventory/issues
Closing this issue
Hi @maharzan86. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
@magento give me 2.4-develop instance
@magento any updates on this ?
@magento give me 2.4-develop instance
@magento any updates on this ?
Our clients are running into this issue and our site is not properly hiding out of stock products on catalog and search pages, leading to confusion from our customers.
@magento any updates on this?
@magento can you provide me 2.4-develop instance as I need to check this issue in 2.4-develop branch.
Hi all
Our customers are facing this issue which is really affecting our sales. Any update on this lads.
@maharzan86 did you find any solution of this
@usman786cs not yet I'm stuck in this issue. Magento is not responding in this issue...
I had also raised the similar issue here https://github.com/magento/magento2/issues/27460. But they tested it on wrong environment i.e. on 2.4 instead of 2.3 and then closed it
Hi everyone I am also facing a similar issue, we are using Magento stock update API to update our stock and the issue occurs on configurable products, the child product qty is set correctly by Magento but the parent item qty is set wrong and sometimes 0 / not saleable resulting in out of the stock issue, on further investigation, I find that something is going wrong on the function: executeList in class Magento\InventoryConfigurableProductIndexer\Indexer\SourceItem\SourceItemIndexer hope this helps someone, please do comment if anybody can make a fix on this.
Looks like this issue is not yet fixed. I fixed this issue by Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku class. We need to pass product sku to get stock info and for specified stock we can get salable qty.
Hope this will help.
@maharzan86 Are you able to solve this issue? Actually we are also facing this type of issue on Magento 2.3.5 Does anyone know how to solve this any patch available? @usman786cs can you please explain via steps so that we also know how to do? thanks
@sumeetmagento Sorry to say not yet. :(
@maharzan86 okay
Hi @usman786cs Facing the same issue on Magento 2.3.5-p2, could you please explain the steps to fix this issue. Thanks!
@maharzan86 please look at:
vendor/magento/module-catalog/Model/Product.php around line 1766 you should find method isInStock (I'm using EE). This method should check is_in_stock attribute but method body is checking product status:
return $this->getStatus() == \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED;
Maybe this is the reason.
This persists in 2.3.6
This persist in 2.4.2
We are also having persistent issues with this on our store on 2.4.2, perhaps most stores ship their orders quickly enough for the indexer to resolve this before a customer encounters it, but occasionally we have to hold an order back, which makes this issue more evident.
i don't really see why whatever index is doing this isn't basing this off the saleable qty and not the stock qty.
we can only manually set the product to out of stock once it's already become a problem.