November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
First Create your Custom Order Content type and add your custom properties
[ContentType(GUID = "9ef12797-913d-46c4-87a7-ceecdd62081c")]
public class MyOrderDiscountPromotion : OrderPromotion
{
/// <summary>
/// The percent of amount off the order.
/// </summary>
public virtual decimal Discount { get; set; }
}
Then create a processor which is called by the promotion engine to apply the promotion
public class MyOrderDiscountPromotionProcessor : OrderPromotionProcessorBase<MyOrderDiscountPromotion>
{
public override RewardDescription Evaluate(MyOrderDiscountPromotion promotionData, PromotionProcessorContext context)
{
throw new NotImplementedException();
}
protected override bool CanBeFulfilled(MyOrderDiscountPromotion promotionData, PromotionProcessorContext context)
{
throw new NotImplementedException();
}
protected override PromotionItems GetPromotionItems(MyOrderDiscountPromotion promotionData)
{
throw new NotImplementedException();
}
}
The PromotionProcessorContext contains all information from the “context” we need to evaluate the promotion.
Hope this is enough to get you started.
Hi Team,
How to implement the custom order promotion.
Advance thanks,
Please share sample code
Edit1:
Commerce version 12.5