Solved

[BUG REPORT] Cart AJAX API updates do not work with bundles

basilkhan
Shopify Partner
49 0 5

Hey Shopify team, we are getting loads of reports of issues with cart updates and all bundles in Shopify (created using "Shopify Bundles app", using cart transform and using the mutation productVariantsBulkUpdate). Specifically, these are not working with cart quantity updates and removal on the bundles on the cart page and cart drawers. Reports have been coming in since yesterday (Jan 10, 2024) on these specific themes: LocalPrestigeImpactEmpire and Expanse themes.

 

This is the error message from cart/change.js request:

```
{
"status": "bad_request",
"message": "Parameter Missing or Invalid",
"description": "Required parameter missing or invalid: 'line' or 'id' param is required"
}
```


Is this issue being looked into? Here's a quick demo of the bug on an internal test store: https://www.loom.com/share/7fb417a382c448648d108d7eda4b67e2

Co-founder and Product Developer at Freshly Commerce ️ | Building Simple Bundles, Simple Discounts, and Freshly Inventory
Accepted Solution (1)
Liam
Shopify Staff
2731 302 783

This is an accepted solution.

Hi Basilkhan,

 

We shipped an update to fix this on Friday - is this resolved for you now?

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 10 (10)

jam_chan
Shopify Partner
908 23 179

I have the same issue. A user reports it today. When I inspect the remove link on the cart page, I don't find any wrong format. Therefore I guess it's not a theme issue 

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview

Liam
Shopify Staff
2731 302 783

Hi Basilkhan,

 

Thanks for flagging this - I've connected with our product teams to investigate this issue, I'll update here asap.

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

basilkhan
Shopify Partner
49 0 5

Thanks for escalating this @Liam! Appreciate it!! 🙏

Co-founder and Product Developer at Freshly Commerce ️ | Building Simple Bundles, Simple Discounts, and Freshly Inventory
Liam
Shopify Staff
2731 302 783

This is an accepted solution.

Hi Basilkhan,

 

We shipped an update to fix this on Friday - is this resolved for you now?

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

basilkhan
Shopify Partner
49 0 5

Amazing! Thanks @Liam to you and the team for the prompt resolution on this bug. Appreciate you all! 🏆

Co-founder and Product Developer at Freshly Commerce ️ | Building Simple Bundles, Simple Discounts, and Freshly Inventory
soymaybis
Shopify Partner
2 0 0

hi, any answer to this problem?

Mike_DiSanto
Shopify Partner
3 0 1

Liam, I found this thread while trying to figure out a similar issue we noticed beginning right on or around 1/10/24 with bundles and /cart/change.js

In our case, we have some items correctly being merged into a bundle parent line item. However, if I then change the line item properties on the parent line item (using cart/change.js), it breaks the bundle and the cart is converted back to just the child items, no parent item, and the original line item properties of the child items (which is how they got bundled) are gone, so it no longer merges.

The timing of this suggests its related to the change that shipped around this time.

Is there a workaround?

Shubham2495
Shopify Partner
1 0 1

Hey Liam, I have the same issue on one of my stores, adding to cart works, but when someone updates quantites in cart, cart/change.js breaks
with this response

{"status":"bad_request","message":"no valid id or line parameter","description":"no valid id or line parameter"}
store url https://leezus.com/,  we use the ajax cart on product pages, the bug is behaving quite erratically, if you add or remove the products multiple times, it stops removing 



 

zmalter99
Shopify Partner
8 0 0

This is still an issue on multiple of our client's stores.

soymaybis
Shopify Partner
2 0 0

Hi i have the same problem in my client online store, I did this method years ago and it works perfectly to delete a group, now when there are more than two items in the cart the method breaks and eliminates the products in disorder

 

$(".remove").click(function(){


event.preventDefault();
event.stopPropagation();

//obtener ids
var idpadre=$(this).attr("idpadre");
var idhijo=$(this).attr("idhijo");


console.log(idhijo);

//borrar padre mas hijo
var data = {
quantity: 0,
id: idpadre
}

jQuery.ajax({
type: 'post',
url: '/cart/change.js',
data: data,
dataType: 'json',
success: function(d){jQuery.post('/cart/change.js', { quantity: 0, id: idhijo })}

});


setTimeout(function() {
window.location.href= '/cart';
}, 1000);


});