Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Add to Cart" button appear on category pages for "Out of Stock" products #26942

Closed
LordHansolo opened this issue Feb 20, 2020 · 11 comments
Closed
Assignees
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed non-issue Reported on 2.3.4 Indicates original Magento version for the Issue report.

Comments

@LordHansolo
Copy link

LordHansolo commented Feb 20, 2020

Preconditions (*)

  1. Magento 2.3.4 CE

Steps to reproduce (*)

  1. Enable MSI.
  2. Set configuration in admin panel Stores->Settings->Configuration->Catalog->Inventory->Stock Options->Display Out of Stock Products = Yes
  3. Add product to cart with maximum available qty.
  4. Place order.
  5. Flush cache.

Expected result (*)

  1. On category page fully sold product has status "Out of Stock" and "Add to Cart" button does not appear.
    category_after_process_order

Actual result (*)

  1. On category page fully sold product has button "Add to Cart".
    category

  2. On product details page everything is fine. We can see "Out of Stock" status and "Add to Cart" button does not appear.
    pdp

Additional Information

Problem also exists in sections like "cross-sell", "up-sell" and "related" where product data is get from products collection. Product stock status comes from column "is_salable" of specified "inventory_stock_*" table. That table is populated during reindex process but it does not care of reservations.

On product details page problem does not exist because stock status is assigned in plugin Magento\InventoryCatalog\Plugin\CatalogInventory\Helper\Stock\AdaptAssignStatusToProductPlugin and it take care of reservations.

@m2-assistant
Copy link

m2-assistant bot commented Feb 20, 2020

Hi @LordHansolo. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@LordHansolo do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Feb 20, 2020
@magento-deployment-service
Copy link

Hi @m2-assistant[bot] Here is your new Magento Instance: https://i-26942-2-4-develop.magento-testing-service.engineering
Admin access: https://i-26942-2-4-develop.magento-testing-service.engineering/admin_c5a2
Login: f25dce96, Password: eb2f9718416d

@krishprakash krishprakash self-assigned this Feb 20, 2020
@m2-assistant
Copy link

m2-assistant bot commented Feb 20, 2020

Hi @krishprakash. 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: 👇

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

@magento-deployment-service
Copy link

Hi @m2-assistant[bot] Here is your new Magento Instance: https://undefined
Admin access: https://undefined/undefined
Login: undefined, Password: undefined

@naydav
Copy link
Contributor

naydav commented Feb 21, 2020

It's behavior by default.

Potentially Index (Stock) could be stored in dedicated data storage not related to SourceItems(reservations) at all.

That's segregation between Read and Command which provide ability to scale Read and Write infrastructure independently.

Maybe make sense to create a separate module for cases when system is not supposed to be split.
But it will be a huge change and should be approved by Product Owner.

@jaivikpatel
Copy link

I also facing the same problem in my Magento 2.3.4 system.
Any Patch or solution for that?

@sumeetmagento
Copy link

Anyone know how to solve this issue ?
facing same issue on Magento 2.3.5-p1

@magento-engcom-team magento-engcom-team added the Reported on 2.3.4 Indicates original Magento version for the Issue report. label Nov 13, 2020
@eBusinessAtlantique
Copy link

Same issue on 2.3.6
I don't understand this behaviour. This is not convenient for the end-user.
How to deal with that ?
Thanks

@ashvinimarwal
Copy link

ashvinimarwal commented May 31, 2021

Same issue on 2.3.1
Update*
My findings

If the source has 10 qty and the total salable qty is zero
then add to cart button will show on the category page but the product page will show out of stock

If the source has 0 qty and the total salable qty is zero
Out of stock button will show on both category and product page

@jaivikpatel
Copy link

Please Re-Open this issue.
Why it is closed before resolved?
It's a very annoying issue.
please Magento team look into it to resolve.

@silversil
Copy link

silversil commented Jul 26, 2021

This is a HUGE bug that must be fixed!
I don't understand why it's been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed non-issue Reported on 2.3.4 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

10 participants