Try our conversational search powered by Generative AI!

OrderForm.Discounts is empty but OrderForm.DiscountAmount has a value



I am using the new marketing engine and I would like to render all discounts in my current cart.
I guess I should use the OrderForm.Discounts collection but that one is always empty. There is a value i OrderForm.DiscountAmount so I guess the caclulation must have been done somewhere.

The CartHelper.GetCartPromotions() also gives me an empty collection.

Should the OrderForm.Discounts include all type of discounts? Shipping, entry and so on?

So the question is how I can get the discounts used for my current cart?

I am using workflows with Commerce 10.3



Edited, Feb 23, 2017 13:45

If you are using the new promotion system then all OrderForm.Discounts, Shipment.Discounts, are empty, because they are only used by the old promotion system. If you want to get the information about discounts, use IOrderForm.Promotions instead. 


Feb 23, 2017 15:38

Thanks Quan, works like a charm!


Feb 23, 2017 16:00
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.