Skip to Content

How to disable/clear promotions from the cart

Hello,

sorry, I have done some research in this area but found no other open thread. I apologize if this is going to be a duplicate.

I need to revert the promotions effects in the cart, change quantities programmatically of multiple lines and then apply promotions again, in this order.

When I call the method PromotionsManager#cleanupCart the give away lines are not removed...maybe because the method is calling protected void deleteStoredPromotionResults(SessionContext ctx, AbstractOrder order, boolean undoActions) with the flag undoActions FALSE....

I need to have a "clean" cart, i.e. without give aways...then doing some operations on quantities only after that re-apply promo again.

How could I achieve this?

Thank you!!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 02, 2015 at 03:05 PM

    The answer, for me, was a very ugly combo: manual undo plus clean cart.

    Hope to learn in the near future a better way.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.