You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to add an item to the cart that has managed inventory true and allow backorders true, providers the following error below.
error: Some variant does not have the required inventory
The issue is table product_variant_inventory_item.required_quantity needs to be updated to 0 when allow_backorders is set to true. I manually converted the value to 0 in the database and was able to add the item to the cart.
Bug report
Describe the bug
When trying to add an item to the cart that has managed inventory true and allow backorders true, providers the following error below.
error: Some variant does not have the required inventory
The issue is table
product_variant_inventory_item.required_quantity
needs to be updated to 0 whenallow_backorders
is set to true. I manually converted the value to 0 in the database and was able to add the item to the cart.System information
Medusa version (including plugins):
@medusajs/medusa@npm:1.20.6-preview-20240819150500 (via preview)
Node.js version:
v21.7.1
Database:
Supabase (postgres)
Operating system:
Ubuntu 22.04.4
Browser (if relevant):
Steps to reproduce the behavior
Optional
5. change backend table
product_variant_inventory_item.required_inventory
to 06. add product to cart -> now works as expected
Expected behavior
Be able to add item to cart when
allow_backorders
= true thenrequired_inventory
= 0The text was updated successfully, but these errors were encountered: