No - i just need it in the basket (when its applied).
So i would have to use the CampaignItemName found in PurchaseOrder.Discounts to find the applied Award item? (i need the type of award fx. PercentOffOrderTotalAward, not just the AmountOffTotal found in the discount list)
So there is no other way then this (pretty ugly one)?:
Build a list of discount.CampaignItemNames, find generic awards, and foreach of them and then:
var amountOffOrderTotalAward = AmountOffOrderTotalAward.FirstOrDefault(y => y.AwardId == award.AwardId); if(amountOffOrderTotalAward != null) //its a amountOffOrderTotalAward type
Identify campaign matching voucher code
Hello:)
Im looking for a way to identify what Marketing campaign match the entered voucher code, how can i do that?
Edit is failing so:
Its the marketing campaignItem im after, not the campaign :)
That information is copied to the applied discount on the order.
Do you need to find it before it's applied to the order?
No - i just need it in the basket (when its applied).
So i would have to use the CampaignItemName found in PurchaseOrder.Discounts to find the applied Award item? (i need the type of award fx. PercentOffOrderTotalAward, not just the AmountOffTotal found in the discount list)
The discount will have the Campaign Item name on it, but you't tell the type from a discount. It's a generic thing used for all discount types.
So there is no other way then this (pretty ugly one)?:
Build a list of discount.CampaignItemNames, find generic awards, and foreach of them and then:
var amountOffOrderTotalAward = AmountOffOrderTotalAward.FirstOrDefault(y => y.AwardId == award.AwardId);
if(amountOffOrderTotalAward != null)
//its a amountOffOrderTotalAward type
The question is: What do you need it for?
It seems to me that there might be a better way of solving it; I just don't know what you're trying to achieve :)
Im looking for a way to determine (and show) what award the customer gets when he/she inputs a voucher code.
fx. 10% discount
Ah, makes sense you can look up a particular promocode by queyring Marketing Foundation:
is working on a reply...