Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Using orderEditSetQuantity to change quantity still shows original quantity in accounts order page

Using orderEditSetQuantity to change quantity still shows original quantity in accounts order page

fullmetal
Shopify Partner
13 0 2

Hi, I’m using graph ql orderEditSetQuantity to set an order item quantity to 0, but it shows up in the order in the accounts page with the quantity before the quantity was set to 0 and factors it into the total cost of the order that’s displayed. Is there any way to NOT show removed items in order page?

Replies 2 (2)

Liam
Community Manager
3108 344 910

Hi Fullmetal,

 

From your description it sounds like the item has not been completely removed from the order, after attempting to use the mentioned mutation to set the order's item to zero. Having looked into this, it seems you would need to update the order using the orderUpdate mutation instead and modify the `lineItems` field accordingly. Within the `lineItems` field, you would include only the line items that you want to keep in the order, effectively removing the line items you wish to remove.

 

Hope this helps!

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

fullmetal
Shopify Partner
13 0 2

Thanks @Liam I don't see anywhere to list items in the OrderUpdate mutation in the OrderInput! It only seems to have 

customAttributes, email, id, localizationExtensions, metafields, note, shippingAddress and tags