Why after removed one item from order "TOTAL_WEIGHT" field not changing in Shopify Orders API?

Highlighted
New Member
11 0 0

After remove item from order "TOTAL_WEIGHT" field not changing in Shopify Orders API i.e. "GET /admin/api/#{api_version}/orders/#{order_id}.json".

I have placed order contains two products then from shopify admin portal removed one product item from order.

Steps to follow:
1. Go to Shopify admin portal
2. Click "Orders" in menu
3. Click on one of the order having Authorized payment status.
4. Click "Edit order" icon
5. Click on "Remove item" link of one of the product item
6. Click on "Update order" button
7. Check order data using shopify Order API.

Expected Result: "TOTAL_WEIGHT" field should update in Order API.

Actual Result: "TOTAL_WEIGHT" field not updated in Order API.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 81 167

Hello @RekhaPreetam , 

 

Thanks for pointing this out! It's worth noting that the order editing feature hasn't launched yet, so what you're seeing is not necessarily the final product. I'll make sure that I bring this up with the team working on it though if they haven't already been made aware, as this seems like it may have just been an oversight. 

 

Thanks again for letting us know! 

0 Likes
Highlighted
New Member
11 0 0

Did you solved this TOTAL_WEIGHT issue?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 81 167

Hello @RekhaPreetam , 

 

At the time, this is actually known behaviour that is meant to occur - the weight is not recalculated when line items are edited.

0 Likes
Highlighted
Tourist
4 0 2

Hi @Josh

When an item is removed from an Order the total_price value doesn't decrease. However, if an item is added by editing the Order, the total_price increases accordingly. Doesn't this seem to be inconsistent? Ideally, the total_price should have decreased when the item is removed from the Order. 

 

If such an Order is fetched from Shopify via API, is it up to us to ignore the items that are removed and recalculate the total/discount/tax accordingly?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 81 167

Hey @ZohoInventory,

 

At this point that is the expectation, yes - you should be able to use the refund_line_items to calculate the correct values.

 

This is an issue we're aware of though, and will hopefully have a solution for soon. Do you mind me asking some more specifics about the issue that this would resolve for you? Is it just a matter of the inconsistency and being able to surface the correct price to a merchant somewhere without having to do the calculations manually? 

0 Likes
Highlighted
Tourist
4 0 2

Hi @Josh,

 

Thank you for your reply.

 

If we do the manually calculate the correct total ourselves by referring the refund_line_items we might run into rounding off error(not to mention the additional overhead). So that is why we expect the correct value to be sent for total_price.

Can we get an ETA for this?

2 Likes