Hi Liam, I was able to replicate it on my development store. Happy to share more details privately about our merchant stores, but here’s a quick summary:
When trying to add 2 items to the cart (with only 1 in stock), it correctly blocks the action. However, after that, trying to add just 1 item also fails, even though it should work.
When using a regular tab, the product shows as “sold out” despite 1 unit being available. In an incognito tab, it works fine.
Steps to Reproduce:
Try adding 2 items to the cart (only 1 in stock) — the system blocks it as expected.
Afterward, try adding 1 item — it fails, even though it’s available.
Refresh in a regular tab, and the product shows as “sold out,” but it should allow 1 item.
Open in an incognito tab, and it adds the product to the cart as expected.
This appears be the same Cart Corruption bug we documented in August last year on the old forums (link includes detailed reproduction steps, and loom videos also):
We’ve got an open ticket with Dustin from Plus Front End Dev support: Your ticket ID is 50143592.
Through the back and forth, it sounds like this is still in the engineering teams backlog.
Any chance you could check in on this ticket please @Liam-Shopify ?
TLDR:
Failing to add a bundle product that is (requires_components) to cart (because it fails cart transformation validation), corrupts the cart for the next add to cart event that is a valid cart transformation. Only a /cart/clear solves this issue.
Invalid ghost products remain in cart
We are concerned that ghost versions of invalid bundle products are lingering in the cart.
When an invalid bundle is added to the cart and you proceed to the checkout page, you encounter the error message, “Some items are no longer available and have been removed from your cart” (referring to the bundle product that shouldn’t have been added because it was invalid and returned an error).
It appears that the “cannot add to cart” error does not effectively prevent the product from being added.
This may be the reason for future conflicts (corrupted cart) when trying to add a valid version of that bundle to the cart.
Here is a video recording of ghost products remaining in cart:
We set the bundle metafield to empty to simulate an invalid bundle
We add the invalid bundle to cart - this returns an error “The bundle product can not be added to cart”
Yeah, this has been a constant issue, and it’s always a headache to explain to merchants. The experience feels buggy, and they worry about losing sales because of it.
Do you think we can reach out to someone in Shopify team to address this and get an update on this?
We’ve been struggling to get an update from our ticket for this.
Any chance you could please follow up @Liam-Shopify ?
@Ashfaq Are you using expand or merge operations in your example? Are you also seeing the CartTransform as a success even when the cart error is cached incorrectly?
It’s been incredibly hard to get steps to repeat the exact issue on our merchants stores. It’s intermittent and incredibly frustrating for customers, merchants, and us.
The bug is:
A bundle fails to add to cart for a reason (yours is inventory, our replicable steps were to force a fail with empty component metafields).
The Cart Transform shows success.
The error is cached in the cart
Subsequent adds to cart of the same bundle product with correct data that should succeed, also fail (functions succeeds, add.js fails)
Proceeding to checkout seems to show a ‘ghost’ product in cart that is not available in the form of a ‘Out of stock’ error popup