I have EPiServer.Commerce 9.19.0 installed (probably promotions are not Beta anymore). I have a requirement to be able to apply different percentage discount for each line item. Basically, I am storing discount % in line item metadata.
Now I created new EntryPromotion and entry promotion processor. In the evaluate method I am loading all line items which has discount % stored in metadata and want to apply those, but when creating RewardDescription there is no way to set discount on each line item - only one value for all line items:
protected override RewardDescription Evaluate( AdditionalItemDiscountPromoData promotionData, PromotionProcessorContext context) { var orderForm = context.OrderForm; var cart = context.OrderGroup as Cart; if (cart == null) { return NoReward(promotionData); } var lineItems = cart.GetAllLineItems().Where(HasDiscount); var priceEntries = new List(); foreach (var lineItem in lineItems) { var discount = //
Is there some other way to apply such promotion?