Remove promotions applied to order

Vote:
 

I have some custom logic when processing orders and I want to be able to remove promotions that have already been applied to an order.

When running the custom logic I apply discounts using purchaseOrder.ApplyDiscounts(new PromotionEngineSettings());

Is there a way to then remove any discounts that were applied?

Thanks

#188921
Mar 06, 2018 23:39
Vote:
 

Last time I check, this should be enough 

        private IOrderGroup Reset(IOrderGroup order)
        {
            foreach (var form in order.Forms)
            {
                form.Promotions.Clear();
            }
            return order;
        }
#188929
Mar 07, 2018 7:28
Vote:
 

+1 from the one above. Don't forget to run promotions again, otherwise the prices won't be changed. 

#188930
Mar 07, 2018 8:13
Vote:
 

Didn't realize it was that simple! Thanks!

#188948
Mar 07, 2018 15:11
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.