I am testing editing my order to replace the product that is being shipped.
My basic flow is
create an order in the test shop - set a discount code for $500 off the order
process the order in my nodejs to do the following:
orderEditSetQuantity of the item I want to remove (setting quantity to 0)
orderEditAddVariant adding the replacement product (which costs the same amount)
The problem comes in that the resulting calculatedOrder has a non zero totalOutstandingSet. In my original order I get:
Do I need to re-add the discountApplications?
Solved! Go to the solution
This is an accepted solution.
Hey @longinoa ,
Happy to help you out with this. Yes, after adding the new line item and assuming the new line item added gets the same discount you would need to add it using orderEditAddLineItemDiscount before your commit.