November Happy Hour will be moved to Thursday December 5th.

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

Vote:
 

Hi!

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

Thanks!

/Kristoffer

#175573
Edited, Feb 23, 2017 13:45
Vote:
 

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. 

Regards,

#175581
Feb 23, 2017 15:38
Vote:
 

Thanks Quan, works like a charm!

/Kristoffer

#175582
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.