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

Inventory part with non-restricted product attributes can't be added to the cart (OCC-229) #419

Closed
sarahelsaig opened this issue Apr 9, 2024 · 0 comments · Fixed by #421
Assignees
Labels
bug Something isn't working

Comments

@sarahelsaig
Copy link
Contributor

sarahelsaig commented Apr 9, 2024

Describe the bug

It's specifically only broken when the product has attributes but none are restricted to predefined values.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new content type.
  2. Add Product part, Price part and Inventory part.
  3. Add a text product attribute field (name doesn't matter).
  4. Create a content item, make sure to set the inventory count to a positive number.
  5. View the content item.
  6. Observe that:
    • ✔️ The inventory number is as expected.
    • 🛑 The Quantity field defaults to 0 instead of 1.
  7. Set the Quantity to 1 and click Checkout.
  8. Observe that:
    • 🛑 An error notification saying "There are not enough X left in stock." is displayed.
    • 🛑 The product is not actually added to the cart.

Expected behavior

It looks like the inventory shopping cart event can't resolve the entry in the inventory dictionary so it defaults to assuming the inventory is 0. This should not be the case.

Screenshots

If applicable, add screenshots to help explain your problem.

Jira issue

@sarahelsaig sarahelsaig added the bug Something isn't working label Apr 9, 2024
@github-actions github-actions bot changed the title Inventory part with non-restricted product attributes can't be added to the cart Inventory part with non-restricted product attributes can't be added to the cart (OCC-229) Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant