Class PromotionProcessorContext

Context object passed into promotion processors and reward applicators, which contains discount information about the affected items.

Inheritance
System.Object
PromotionProcessorContext
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public class PromotionProcessorContext

Constructors

PromotionProcessorContext(IOrderGroup, IOrderForm, ILineItemCalculator, IOrderFormCalculator, IShippingCalculator)

Creates an instance of a PromotionProcessorContext.

Declaration
public PromotionProcessorContext(IOrderGroup orderGroup, IOrderForm orderForm, ILineItemCalculator lineItemCalculator, IOrderFormCalculator orderFormCalculator, IShippingCalculator shippingCalculator)
Parameters
Type Name Description
IOrderGroup orderGroup

The order group that is evaluated.

IOrderForm orderForm

The order form.

ILineItemCalculator lineItemCalculator

The line item calculator

IOrderFormCalculator orderFormCalculator

The order form calculator.

IShippingCalculator shippingCalculator

The shipping calculator.

Properties

CurrentOrderFormSubTotal

Gets the current order form sub total that the promotion engine is processing at the time. This is calculated before every promotion has been evaluated.

Declaration
public decimal CurrentOrderFormSubTotal { get; }
Property Value
Type Description
System.Decimal

EntryPrices

Gets the price matrix for entries. Used to get the current state of prices for the line items. May change as more promotions are applied.

Declaration
public OrderFormPriceMatrix EntryPrices { get; }
Property Value
Type Description
OrderFormPriceMatrix

OrderForm

Gets the order form.

Declaration
public IOrderForm OrderForm { get; }
Property Value
Type Description
IOrderForm

OrderGroup

Gets the order group.

Declaration
public IOrderGroup OrderGroup { get; }
Property Value
Type Description
IOrderGroup

ShipmentPrices

Gets the price matrix for shipments.

Declaration
public ShipmentPriceMatrix ShipmentPrices { get; }
Property Value
Type Description
ShipmentPriceMatrix

Methods

Clone()

Clones the promotion processor context object.

Declaration
public virtual PromotionProcessorContext Clone()
Returns
Type Description
PromotionProcessorContext

The cloned context object.

UpdateDiscounts()

Update the discount information on the line items, and shipments, that were used to populate EntryPrices and ShipmentPrices.

Declaration
public virtual void UpdateDiscounts()