Class EntryRewardApplicator
Modifies entry prices in a OrderFormPriceMatrix.
Inheritance
Inherited Members
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0Syntax
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
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
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
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
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. |