Hello, I am looking for some help on orderflows and promotion calculations, any help would be appreciated.
When a user places an order successfully on our website, we set the order to AwaitingExchange. We then have a scheduled job that loops through orders with the AwaitingExchange status and sends them off to our company's internal order processor. There are a few things that could cause the order to be flagged, in which case we will not send the order and set the order to On Hold (a custom meta field).
If an order is set to On Hold and the issue is resolved, then a Commerce Admin will go in and remove the hold flag. When this happens, we lose some discounts. Now, I found one thread with a very similar issue (https://world.optimizely.com/forum/developer-forum/Commerce/Thread-Container/2020/12/updating-order-address-causes-price-changes/) and the problem seems to be related to customizations which we definitely have. However, I can't seem to pinpoint what it is.
We have some code that runs when a promotion is applied to a cart which calculates the promotion and tax. I tried adding that code to run on IOrderEvents.SavingOrder. I verified that the event is fired and the code runs without exceptions. However, its not solving the issue.
What do you guys think is going on?
↧
Losing discounts when updating order in admin mode
↧