Discussions on bundle app development
Hey all,
We're seeing a strange issue for a recently upgraded checkout that wants to utilize bundles (using "Shopify bundles" app).
We've upgraded the checkout a week or so ago and installed the Shopify bundles app. Everything works well and you can complete an order - and it's reported as a bundle. Awesome.
However, if you interacted with the legacy checkout page before the migration it doesn't work as expected. You can check out fine but if you refresh the checkout page (or go back to the store) the bundle is lost. It gets split to the individual line items and it uses that price (not the bundle price).
If you look at localStorage it has "sessionType = cart" when it has this broken behaviour. When it works (i.e if you try in incognito mode or clear cookies) it has "sessionType = cartNext". Clearing that session value gets reset so doesn't seem to work.
Also, in the case where it works as expected "/cart.js" returns "has_components=true" for a bundled line item wh but "has_components=false" when it doesn't. When it's "false" it still renders as a single item in the cart and in the API response as expected - it's only when you navigate to the checkout where it really breaks.
This one is bit specific, but has anyone experienced anything like this one? We're hoping things will fix itself after the cart/checkout tokens expire and new tokens are generated.
Ideally we would like to get the bundles up and running before then if possible.
Thanks for your help! 😄
I have the same issue after migrating to cart transform API. @craig_84labs did you end up fixing the problem?
Best regards
Lukas
@Lukas50 I did a workaround which isn't great, but it worked for our use-case.
In the frontend when a cart is loaded I would inspect the cart cookie and see if it was an "old" cart and that there was a bundled line item.
If yes, then I would essentially rebuild the cart (clear items and re-add - seamless to the user). This would result in a new cart cookie/token to be generated by Shopify which would use the new format and fix the issue.
I believe the cart cookies expire after ~28 days. So alternatively (although haven't tested this myself) I think you can wait it until they expire and you should get a new cookie for all customers which should fix the issue. We couldn't wait that long on our end since bundles were already live.
@craig_84labs thanks a lot for your answer! Let's hope for the best that this is solved soon and the cart rebuild was also for me the only thing i came up with. But it helps a lot to know that waiting 2-3 days is not an option so i can directly implement the solution.
Thank you and have a great day! 🙂