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

[FO] CART- the button "Add to Cart" enable while the product is out of stock #486

Open
Zoefinders opened this issue Apr 3, 2023 · 8 comments
Assignees
Labels
Bug Something isn't working Product Page Verified The issue has been reproduced

Comments

@Zoefinders
Copy link

Zoefinders commented Apr 3, 2023

Describe the bug

When you add more items than in stock from product page, the message The product is no longer available in this quantity. is not displayed and the button "Add to cart" still enable.

Expected behavior

The button "Add to cart" should be disabled as the product is out of stock

Steps to reproduce

  1. BO>Create a product with stock 5
  2. FO>add up to 6 of this product
  3. See error > the button "Add to cart" is not disabled => ❌
  4. Click on the button "Add to cart"
  5. An error message is displayed => ✅
  6. The product is not add to the cart => ✅

Screen record

Uploading hb_issueCart.webm…

Additional infos

  • HummingBird version: 0.1.5
  • PS version: develop
  • PHP version: 7.4
@Zoefinders Zoefinders converted this from a draft issue Apr 3, 2023
@Zoefinders Zoefinders added Bug Something isn't working Product Page labels Apr 3, 2023
@Zoefinders Zoefinders changed the title [FO] CART- [FO] CART- Product added to the cart while the it's out of stock Apr 3, 2023
@Zoefinders Zoefinders changed the title [FO] CART- Product added to the cart while the it's out of stock [FO] CART- Product added to the cart while it's out of stock Apr 3, 2023
@ga-devfront
Copy link
Collaborator

@Zoefinders didn't find how to reproduce this issue (we got the message, but the product is not added).

@Hlavtox
Copy link
Contributor

Hlavtox commented Apr 5, 2023

@ga-devfront Maybe it was fixed with recent core changes. On develop, it doesn't get added to cart?

@ga-devfront
Copy link
Collaborator

@Hlavtox yes we tested with 8.0.2 PrestaShop and the product is not added to the cart.

@tajriba
Copy link

tajriba commented Apr 21, 2023

@ga-devfront hi,
we can also add more products inside the cart (hummingbird+prestashop 801).
I see no fixes for this in prestashop 802.

@tajriba
Copy link

tajriba commented Apr 21, 2023

see this. 1 product in stock. you can't order more than 1.
but in the cart I can set it to 2, the tooltip appears. But it must be working like this: not possible to change quantity to 2, are at least, not stays at quantity 2 in the cart.
Scherm­afbeelding 2023-04-21 om 14 05 14

@hibatallahAouadni hibatallahAouadni self-assigned this Apr 27, 2023
@hibatallahAouadni hibatallahAouadni changed the title [FO] CART- Product added to the cart while it's out of stock [FO] CART- the button "Add to Cart" enable while the product is out of stock May 10, 2023
@hibatallahAouadni hibatallahAouadni removed their assignment May 10, 2023
@Zoefinders Zoefinders moved this from 🔖 Ready to 🏗 In progress in Hummingbird release flightpath May 24, 2023
@ga-devfront ga-devfront self-assigned this May 25, 2023
@ga-devfront
Copy link
Collaborator

After some investigation on PS 8.1.0 with Hummingbird I don't think it's a good idea to try to catch it with JS :
https://www.awesomescreenshot.com/video/18043819?key=6c8e9ceb6fb32a97f89328f425c3a1d3
the add to cart button is not disabled but then we click we got the error message (on homepage and page product).
If you really want it possible to handle it by JS but it require much changes and it's impossible to got the real time quantity and variation.
What do you think ?

@ga-devfront
Copy link
Collaborator

After discussion with @kpodemski and @MatShir this issue need to add an API call on Core side for V9.
It's not a blocking point for moment, cause the error is already handled with error message.

@ga-devfront ga-devfront moved this from 🏗 In progress to Archive in Hummingbird release flightpath Sep 1, 2023
@florine2623 florine2623 added the Verified The issue has been reproduced label Mar 29, 2024
@tblivet
Copy link
Contributor

tblivet commented Jun 12, 2024

I have just tested it, and it looks good. What do you think?

add_to_cart_test.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Product Page Verified The issue has been reproduced
Projects
Status: Archive
Development

No branches or pull requests

7 participants