November Happy Hour will be moved to Thursday December 5th.

Class EntryRewardApplicator

Modifies entry prices in a OrderFormPriceMatrix.

Inheritance
System.Object
EntryRewardApplicator
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: 13.30.0
Syntax
public class EntryRewardApplicator : RewardApplicatorBase<AffectedEntries>

Constructors

EntryRewardApplicator()

Initializes a new instance of the EntryRewardApplicator class.

Declaration
public EntryRewardApplicator()

Properties

DiscountType

Gets the DiscountType used to determine which property to update on the ILineItem or IShipment.

Declaration
public override DiscountType DiscountType { get; }
Property Value
Type Description
DiscountType
Overrides

Methods

AddGiftItem(AffectedEntries, PromotionProcessorContext)

Declaration
protected override decimal AddGiftItem(AffectedEntries item, PromotionProcessorContext processorContext)
Parameters
Type Name Description
AffectedEntries item
PromotionProcessorContext processorContext
Returns
Type Description
System.Decimal
Overrides
EPiServer.Commerce.Marketing.RewardApplicatorBase<EPiServer.Commerce.Marketing.AffectedEntries>.AddGiftItem(EPiServer.Commerce.Marketing.AffectedEntries, EPiServer.Commerce.Marketing.PromotionProcessorContext)

ApplyDiscount(AffectedEntries, Decimal, PromotionProcessorContext)

Sets a saved amount using discountAmount and validates that the total discount is not higher than the total placed price for the line item.

Declaration
protected override decimal ApplyDiscount(AffectedEntries item, decimal discountAmount, PromotionProcessorContext processorContext)
Parameters
Type Name Description
AffectedEntries item

The affected item containing the discount.

System.Decimal discountAmount

The discount amount in money.

PromotionProcessorContext processorContext

The promotion processor context for the promotion applicator.

Returns
Type Description
System.Decimal

The discount amount.

Overrides
EPiServer.Commerce.Marketing.RewardApplicatorBase<EPiServer.Commerce.Marketing.AffectedEntries>.ApplyDiscount(EPiServer.Commerce.Marketing.AffectedEntries, System.Decimal, EPiServer.Commerce.Marketing.PromotionProcessorContext)

ApplyFixedPrice(AffectedEntries, Decimal, PromotionProcessorContext)

Declaration
protected override decimal ApplyFixedPrice(AffectedEntries item, decimal fixedPrice, PromotionProcessorContext processorContext)
Parameters
Type Name Description
AffectedEntries item

The affected item containing the discount.

System.Decimal fixedPrice
PromotionProcessorContext processorContext

The promotion processor context for the promotion applicator.

Returns
Type Description
System.Decimal
Overrides
EPiServer.Commerce.Marketing.RewardApplicatorBase<EPiServer.Commerce.Marketing.AffectedEntries>.ApplyFixedPrice(EPiServer.Commerce.Marketing.AffectedEntries, System.Decimal, EPiServer.Commerce.Marketing.PromotionProcessorContext)

ApplyFreeItems(AffectedEntries, PromotionProcessorContext)

Set saved amount by giving the items away for free.

Declaration
protected override decimal ApplyFreeItems(AffectedEntries item, PromotionProcessorContext processorContext)
Parameters
Type Name Description
AffectedEntries item

The affected item containing the discount.

PromotionProcessorContext processorContext

The promotion processor context for the promotion applicator.

Returns
Type Description
System.Decimal

The discount amount.

Overrides
EPiServer.Commerce.Marketing.RewardApplicatorBase<EPiServer.Commerce.Marketing.AffectedEntries>.ApplyFreeItems(EPiServer.Commerce.Marketing.AffectedEntries, EPiServer.Commerce.Marketing.PromotionProcessorContext)

ApplyPercentage(AffectedEntries, Decimal, PromotionProcessorContext)

Sets a saved amount based on percentage and validates that the total discount is not higher than the total placed price for the line item.

Declaration
protected override decimal ApplyPercentage(AffectedEntries item, decimal percentage, PromotionProcessorContext processorContext)
Parameters
Type Name Description
AffectedEntries item

The affected item containing the discount.

System.Decimal percentage

The percentage to use.

PromotionProcessorContext processorContext

The promotion processor context for the promotion applicator.

Returns
Type Description
System.Decimal

The discount amount.

Overrides
EPiServer.Commerce.Marketing.RewardApplicatorBase<EPiServer.Commerce.Marketing.AffectedEntries>.ApplyPercentage(EPiServer.Commerce.Marketing.AffectedEntries, System.Decimal, EPiServer.Commerce.Marketing.PromotionProcessorContext)