Hi,
I’m running into a specific issue with the Cart Transform API (linesMerge operation) regarding how Out of Stock (OOS) bundles are handled.
The Issue Summary: When a merged bundle becomes OOS at checkout, clicking the “Continue” button on the warning prompt removes the OOS bundle (as expected). However, it also unexpectedly removes all other merged bundles that are located below the OOS bundle in the line items list. Any bundles positioned above the OOS bundle remain safe.
I’ve tested this across layouts, and this issue only occurs on the 3-page checkout. On the 1-page checkout, it works perfectly (only the OOS bundle is removed).
Steps to Reproduce:
1. Add two independent bundles (no shared components), then proceed to the 3-page checkout. (Bundle A is listed first, Bundle B is second).
2. In the Shopify Admin, change the inventory of one component belonging to the first bundle (Bundle A) to 0.
3. Refresh the checkout page. The OOS warning prompt appears correctly for Bundle A.
4. Click “Continue”.
- Result: Both Bundle A and Bundle B are removed from the checkout. (Bundle B had all components fully in stock and should have stayed).
The function logs in the Partner Dashboard show no errors and execute successfully during this whole process.
Since the logic works exactly as intended on the 1-page checkout but fails on the 3-page checkout, it seems like an issue on Shopify’s end with how the cart state updates after the OOS prompt.
It would be great if someone from the Shopify staff could take a look at this. Let me know if you need more details!
Thanks!
Hey,
I go through your detailed breakdown that’s a well-documented bug report and it makes the issue easy to follow.
What you’re describing sounds like a positional deletion problem in the linesMerge operation. When the OOS bundle is removed on the 3-page checkout, it’s likely triggering a re-index of the line items array from that position downward, causing everything below it to get swept out along with it. The fact that bundles above the OOS item are unaffected strongly points in that direction.
The 1-page vs 3-page discrepancy is the interesting part here. The 1-page checkout likely processes the cart state in a single pass, while the 3-page flow probably re-evaluates or re-renders line items between steps which is where the bad deletion logic kicks in.
A few things worth checking on your end while this gets investigated:
-
Are the merged bundle IDs stable across checkout steps, or are they being reassigned when the cart re-evaluates?
-
Does the issue persist if the OOS bundle is the last item in the list, i.e. nothing below it?
-
Is there a cart update call happening silently in the background after the “Continue” button is clicked?
If you can share a reproducible test case or a snapshot of the line items payload before and after the removal, that would help narrow it down significantly.
This looks like a bug on the Cart Transform API side rather than anything in your implementation — worth escalating to Shopify support with your findings if you haven’t already.
Happy to dig deeper if you can share more details.
Confident, technical, and helpful without overcomplicating it.
To quickly address the points: yes, the bundle IDs are completely stable, there are no background cart updates interfering, and as noted in the original post, the issue only happens if there are valid items below the OOS bundle.
I believe that the issue points to an internal index-shifting bug in the 3-page checkout logic.
Still hoping to get eyes on this from the Shopify team.
Hey @Oleksii - thanks for flagging this and the screenshots. I checked this against the documented Cart Transform behaviour, and I’m not seeing anything that would make an in-stock, independent linesMerge bundle below the OOS bundle get removed.
Could you share a checkout token or request ID/timestamp, the function output around the failing checkout, and whether any other Cart Transform functions are installed on the store? Let me know if you’d rather DM that info and I can set one up - hope this helps!
Hi @Alan_G,
Thank you for taking a look!
I would prefer to share the specific details via DM. Looking forward to your message!
No worries @Oleksii - sending you a DM now.
Hey @Oleksii and all - we’re looking into this now as a possible issue on our side. I’ll keep you folks updated here. Thanks for the patience!