Change multiple Cart Items at once (quantity and selling_plan)

Topic summary

A developer is struggling to update multiple cart items simultaneously when working with product bundles (2-8 products grouped together). The goal is to change both quantity and selling_plan for all bundled items at once.

Technical Challenge:

  • Attempting to use Shopify’s Cart API to update multiple items in a single request
  • Consistently receiving “bad request” errors
  • Tried different payload formats with item IDs, quantities, and selling_plan parameters

Current Status:

  • The developer discovered that Shopify’s Cart Change JS API does not support bulk operations
  • Workaround identified: Delete the existing bundled items and re-add them with updated parameters

Key Limitation:
Shopify’s native cart update functionality doesn’t allow simultaneous modifications of multiple line items, forcing developers to use a delete-and-recreate approach for bundle scenarios.

Summarized with AI on November 22. AI used: claude-sonnet-4-5-20250929.

Hi,

In our Shop we have implemented a Bundle Logic bundling 2 to 8 products into one. In our Cart we show the bundle all in one Card with incredients. In order to change quantity and selling plan in our cart its necessary to change all items in one bundle. I dont know what exactly im doing wrong here but i always get bad requests.

let updateItems = {"id":"43603405996260:dbd0192e627f613dbadb11c7e9fd9a02", "quantity": 3, "selling_plan": 3613196516}

let updateItems2 = {items:[{'id':'436034260:dbd0192e627f61311c7e9fd9a02','quantity':3,'selling_plan':36136516},{'id':'43604534260:dbd0192e627f61311c7e9fd9a02','quantity':2,'selling_plan':3612136516}]}
updateCartItem(updateItems)
updateCartItem(updateItems2)

function updateCartItem (item) {
    fetch('/cart/change.js', 
      {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        updates:
        item
      })
    })
    .then(response => { 
      response.json();
      console.log(response)  
    } 
    )
.catch(console.error)

  }

Many thanks :slightly_smiling_face:

Cart Change Js is not working with bulk operations. The only Solution at this point is to delete and add them again.