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

Out of Stock inventory throws 400 but isn't handled gracefully on StoreFront #227

Open
ishaiktaher opened this issue Dec 22, 2023 · 0 comments

Comments

@ishaiktaher
Copy link

When a customer tries to add an out of stock product, application just stays still.

When you check in network calls the addToCart method return 400 error.

Ideally add to cart button should be disabled with "Out of Stock" label.

Could you pls help me with API that returns quantity of inventory on Product-Details page.

error: Variant with id: variant_01HHZ6GWTHB4BS58R3CDWPVDJ5 does not have the required inventory Error: Variant with id: variant_01HHZ6GWTHB4BS58R3CDWPVDJ5 does not have the required inventory at CartService.<anonymous> (/Users/tech/admin/node_modules/@medusajs/medusa/dist/services/cart.js:865:55) at step (/Users/tech/admin/node_modules/@medusajs/medusa/dist/services/cart.js:59:23) at Object.next (/Users/tech/admin/node_modules/@medusajs/medusa/dist/services/cart.js:40:53) at fulfilled (/Users/tech/admin/node_modules/@medusajs/medusa/dist/services/cart.js:31:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { type: 'not_allowed', code: 'insufficient_inventory', date: 2023-12-19T19:32:49.599Z }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant