inventory icon indicating copy to clipboard operation
inventory copied to clipboard

Product having zero salable quantity results in stock in product list page and out of stock in view page.

Open maharzan86 opened this issue 5 years ago • 72 comments

Preconditions (*)

  1. Magento 2.3.5-p1(MSI enabled)

Steps to reproduce (*)

  1. Create a simple product with qty = 1
  2. Place an order that will cause the product to have 0 salable quantity
  3. The Salable Quantity drops to zero, while the Quantity remains at 1.

Expected result (*)

  1. The product, having Salable Quantity 0, should display out of stock label in both product list page and product view page.

Actual result (*)

  1. 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 スクリーンショット 2020-05-22 12 18 16

product list page スクリーンショット 2020-05-22 12 11 27 product view page

スクリーンショット 2020-05-22 12 12 09

maharzan86 avatar May 22 '20 03:05 maharzan86

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).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced 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: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

m2-assistant[bot] avatar May 22 '20 04:05 m2-assistant[bot]

@ajijshekh123 @m2-assistant any updates...

maharzan86 avatar May 26 '20 02:05 maharzan86

@magento give me 2.4-develop instance

ajijshekh123 avatar May 27 '20 06:05 ajijshekh123

Hi @ajijshekh123. Thank you for your request. I'm working on Magento 2.4-develop instance for you

magento-engcom-team avatar May 27 '20 06:05 magento-engcom-team

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.

magento-engcom-team avatar May 27 '20 06:05 magento-engcom-team

Hi Sir, Can give me the ticket of Dev commit. Thanks

wallacehao avatar May 27 '20 14:05 wallacehao

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).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced 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: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

m2-assistant[bot] avatar May 28 '20 04:05 m2-assistant[bot]

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

swathishs avatar May 28 '20 04:05 swathishs

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


m2-assistant[bot] avatar May 28 '20 13:05 m2-assistant[bot]

@magento give me 2.4-develop instance

maharzan86 avatar May 29 '20 01:05 maharzan86

@magento any updates on this ?

maharzan86 avatar Jun 01 '20 00:06 maharzan86

@magento give me 2.4-develop instance

maharzan86 avatar Jun 01 '20 01:06 maharzan86

@magento any updates on this ?

maharzan86 avatar Jun 10 '20 05:06 maharzan86

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.

nuethicadam avatar Jun 26 '20 20:06 nuethicadam

@magento any updates on this?

maharzan86 avatar Jul 22 '20 09:07 maharzan86

@magento can you provide me 2.4-develop instance as I need to check this issue in 2.4-develop branch.

maharzan86 avatar Jul 22 '20 10:07 maharzan86

Hi all

Our customers are facing this issue which is really affecting our sales. Any update on this lads.

usman786cs avatar Aug 13 '20 13:08 usman786cs

@maharzan86 did you find any solution of this

usman786cs avatar Aug 13 '20 13:08 usman786cs

@usman786cs not yet I'm stuck in this issue. Magento is not responding in this issue...

maharzan86 avatar Aug 14 '20 05:08 maharzan86

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

lokeshvnaik avatar Aug 24 '20 07:08 lokeshvnaik

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.

JithinJay avatar Aug 27 '20 04:08 JithinJay

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.

usman786cs avatar Aug 27 '20 07:08 usman786cs

@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 avatar Sep 18 '20 15:09 sumeetmagento

@sumeetmagento Sorry to say not yet. :(

maharzan86 avatar Sep 23 '20 07:09 maharzan86

@maharzan86 okay

sumeetmagento avatar Sep 23 '20 07:09 sumeetmagento

Hi @usman786cs Facing the same issue on Magento 2.3.5-p2, could you please explain the steps to fix this issue. Thanks!

MBansode avatar Oct 07 '20 05:10 MBansode

@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.

marrrecki avatar Oct 21 '20 18:10 marrrecki

This persists in 2.3.6

pixel-paul avatar Nov 19 '20 14:11 pixel-paul

This persist in 2.4.2

johan7avila avatar Apr 27 '21 16:04 johan7avila

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.

IanFiretoys avatar Aug 23 '21 10:08 IanFiretoys