saleor / saleor-storefront

A GraphQL-powered, NextJs-based, PWA storefront for Saleor. IMPORTANT: This project is [DEPRECATED] in favor of saleor/react-storefront soon to become our default demo and storefront starter pack.
https://demo.saleor.io/
BSD 3-Clause "New" or "Revised" License
769 stars 672 forks source link

BLOCKER - Removing item stays inside local storage and stops the checkout process completly. #1059

Closed gorjan-mishevski closed 3 years ago

gorjan-mishevski commented 3 years ago

Found a serious bug. You can observe this on the storefront demo app also. The cart API remove item method doesn't remove the item, rather it only sets quantity 0. Then when doing the checkout Saleor fails with "ZERO_QUANTITY" error.

Reproduce this by adding a product then removing the product. Then add another product. Go to checkout. Add address. Saleor fails. Observe the localstorage.

checkoutCreate: {,…}
checkout: null
errors: [{code: "ZERO_QUANTITY", field: "quantity", message: "The quantity should be higher than zero.",…}]
0: {code: "ZERO_QUANTITY", field: "quantity", message: "The quantity should be higher than zero.",…}
__typename: "CheckoutCreate"
karolkielecki commented 3 years ago

@gorjan-mishevski Hi! Thanks for reporting. We've fixed it in SDK: https://github.com/mirumee/saleor-sdk/releases/tag/v0.3.0-10. We'll also release the beta version of Saleor Storefront with some fixes, probably this week.

Cheers,

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.