I'm just getting started with the new Promotions API and am trying to simply display the description of the applied promotions for the current cart.
The discounts are affecting the totals but I just can't seem to find the promotion info for what have caused the discount. I can't find this info in the debugger on the ICart object, so probably am meant to get this another way. (Perhaps this is really obvious as I cannot find any info around of how to do it?).
FYI I'm using Epi Commerce v11.2.5
Realise I should mention that my EntryPromotionProcessor implementation of Evaluate is returning a RewardDescription with the description I want to show. I just am wanting to find the promotion description on the cart object and easily then display this to the user so they know what promotion they've qualified for.
You have your applied promotions on the OrderForm. So you could do
PromotionInformation appliedPromotions = orderForms.SelectMany(x => x.Promotions);
and the promotionInformation should have the info you need!
Thanks Joel! (didn't expect a reply so soon too!)
Can confirm your suggestion works exactly as I needed. Both of these lines work for my ICart:
var promotions = cart.GetFirstForm().Promotions;var promotions2 = cart.Forms.SelectMany(x => x.Promotions);
Appreciate the guidance!
I blame the slow RSS feed for more than 5 minutes delayed answer! :D