Shopify Bug: Adding Product to Cart Despite Inventory Limit Reached

Solved

Shopify Bug: Adding Product to Cart Despite Inventory Limit Reached

larsmbm
Shopify Partner
3 1 2

Description of the situation:
I'm encountering an issue in Shopify where I have a product with a stock quantity of 7, and the 'Continue selling when out of stock' option is enabled. When I add this product to my cart seven times, everything works as expected. However, when I attempt to add an eighth item to my cart, I receive the following 442 response from Shopify: {"status":422,"message":"Cart Error","description":"All 7 <product-name> are in your cart."}. This response originates from the request URL: shopifypreview.com/cart/add.

This is problematic because the product is set to "continue selling when out of stock." Despite this error message, and no visible changes on the front end, the product is indeed added to the cart, as seen upon refreshing the page. I suspect this to be a bug that needs to be addressed. Since it stems from Shopify's response, there's little we can do within our Dawn theme clone.

This issue only occurs when the exact inventory_quantity is present in the shopping cart and the same product is added again. If the cart is empty and 8 items are added directly, the process works correctly.

Accepted Solution (1)
larsmbm
Shopify Partner
3 1 2

This is an accepted solution.

Thanks for your reaction. I did take some time for Shopify to send the issue to the correct development support team but last week I did get this reaction 🙂

Shopify Plus Technical Support team: "I'm reaching out to let you know that our developers have recently released an update to address this and improve our systems functionality."

And I can confirm this 🙂

View solution in original post

Replies 6 (6)

vattujan
Shopify Partner
4 0 2

Adding to the issue:

The same thing happens for products in multiple locations, where some locations does not fulfill orders online. It takes inventory from all the locations.
FX: If a variant inventory in Location1 is 2 and location2 is 4, and location2 is a physical location which does not fulfill online orders, it takes all the inventory as variant inventory i.e. 6, instead of just taking 2.
So now basically I can add six products to cart even though only 2 is available online.

MaxDesign
Shopify Partner
214 15 87

@larsmbm I doubt the issue will be picked up from the forum, you should open a ticket and explain. Do a (loom) video if you can, it'll save you time to explain yourself, I tend to repeat myself a lot when chatting with support.

@vattujan I think what you're referring to is "Fullfillabe Inventory" feature. It was not supported until recently and would cause overselling. You have some docs on it to enable this feature: https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/fulfillable-invent... in short, buyers won't be able to purchase products that are no longer in stock in there shipping area, even if there's stock left in another shipping area.

Reach out to me at [email protected]
larsmbm
Shopify Partner
3 1 2

Sorry for the late reaction. Do you know where I could open a ticket? Thanks for the tip for the video 🙂

Erin
Shopify Staff (Retired)
1116 138 180

Hi, there! You can contact our support team through the Help Center here. I recommend anyone experiencing this issue do this so we can take a closer look at what's happening. We can't see account details here over the Shopify Community, but if you contact us through the Help Center we can review this with you in more detail.

Erin | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

larsmbm
Shopify Partner
3 1 2

This is an accepted solution.

Thanks for your reaction. I did take some time for Shopify to send the issue to the correct development support team but last week I did get this reaction 🙂

Shopify Plus Technical Support team: "I'm reaching out to let you know that our developers have recently released an update to address this and improve our systems functionality."

And I can confirm this 🙂

jmclovinxc
Visitor
2 0 0

I'm glad I found this post after spending a few hours trying to figure out what was going on before determining the cause is in the cart/add endpoint.

The other odd thing for my case is that after the error shows the first time, you can click "Add to cart" a 2nd time and it will successfully add the quantity to the cart!

 

This seems like an easy fix to not throw this error when the 'Continue selling when out of stock' option is enabled, so hopefully it's resolved soon.