8000 Add logic to prevent selection of not available quantities by gciotola · Pull Request #71 · commercelayer/mfe-cart · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add logic to prevent selection of not available quantities #71

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

Merged
merged 1 commit into from
May 23, 2024

Conversation

gciotola
Copy link
Contributor
@gciotola gciotola commented May 23, 2024

Closes #70

What I did

Now the quantity selector component is aware of the available quantity returned from line_items.item.inventory.
It's not possible to increase the line item quantity in the cart, once it has reached the available quantity from the inventory.

I've also removed the <Errors> component that was wrongly used in each line item. Instead, it refers to the entire order/cart and is not rendered above the "go to checkout" button.

How to test

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

@gciotola gciotola changed the title fix: add logic to prevent selection of not available quantities Add logic to prevent selection of not available quantities May 23, 2024
@gciotola gciotola force-pushed the quantity-selector-availability branch from 6d65c28 to 8945597 Compare May 23, 2024 14:23
@gciotola gciotola requested a review from malessani May 23, 2024 14:23
@gciotola gciotola added the bug Something isn't working label May 23, 2024
@gciotola gciotola force-pushed the quantity-selector-availability branch from 8945597 to c249ae3 Compare May 23, 2024 15:38
@gciotola gciotola self-assigned this May 23, 2024
@gciotola gciotola force-pushed the quantity-selector-availability branch from c249ae3 to a55bb87 Compare May 23, 2024 16:24
@gciotola gciotola merged commit 39fb283 into master May 23, 2024
2 checks passed
@gciotola gciotola deleted the quantity-selector-availability branch May 23, 2024 16:44
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
Development

Successfully merging this pull request may close these issues.

Stock information in the cart doesn't update accurately
2 participants
0