Class GetFreeItemsProcessorBase<TEntryPromotion>

Base class for processors for promotions giving free items discount.

Inheritance
System.Object
PromotionProcessorBase<TEntryPromotion>
GetFreeItemsProcessorBase<TEntryPromotion>
Implements
Namespace: EPiServer.Commerce.Marketing.Promotions
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public abstract class GetFreeItemsProcessorBase<TEntryPromotion> : EntryPromotionProcessorBase<TEntryPromotion>, IPromotionProcessor where TEntryPromotion : EntryPromotion
Type Parameters
Name Description
TEntryPromotion

Constructors

GetFreeItemsProcessorBase(CollectionTargetEvaluator, FulfillmentEvaluator, LocalizationService, Func<TEntryPromotion, PurchaseQuantity>)

Declaration
public GetFreeItemsProcessorBase(CollectionTargetEvaluator targetEvaluator, FulfillmentEvaluator fulfillmentEvaluator, LocalizationService localizationService, Func<TEntryPromotion, PurchaseQuantity> conditionGetter)
Parameters
Type Name Description
CollectionTargetEvaluator targetEvaluator

The service that is used to evaluate an order against a promotion's target properties.

FulfillmentEvaluator fulfillmentEvaluator

The service that is used to evaluate the fulfillment status of the promotion.

EPiServer.Framework.Localization.LocalizationService localizationService

The localization service.

System.Func<TEntryPromotion, PurchaseQuantity> conditionGetter

Delegate to get the condition from the promotion.

Methods

CanBeFulfilled(TEntryPromotion, PromotionProcessorContext)

Declaration
protected override bool CanBeFulfilled(TEntryPromotion promotionData, PromotionProcessorContext context)
Parameters
Type Name Description
TEntryPromotion promotionData
PromotionProcessorContext context
Returns
Type Description
System.Boolean
Overrides
EPiServer.Commerce.Marketing.PromotionProcessorBase<TEntryPromotion>.CanBeFulfilled(TEntryPromotion, EPiServer.Commerce.Marketing.PromotionProcessorContext)

Evaluate(TEntryPromotion, PromotionProcessorContext)

Declaration
protected override RewardDescription Evaluate(TEntryPromotion promotionData, PromotionProcessorContext context)
Parameters
Type Name Description
TEntryPromotion promotionData
PromotionProcessorContext context
Returns
Type Description
RewardDescription
Overrides
EPiServer.Commerce.Marketing.PromotionProcessorBase<TEntryPromotion>.Evaluate(TEntryPromotion, EPiServer.Commerce.Marketing.PromotionProcessorContext)

GetAffectedEntries(TEntryPromotion, PromotionProcessorContext, IEnumerable<String>)

Gets the affected entries.

Declaration
protected abstract AffectedEntries GetAffectedEntries(TEntryPromotion promotionData, PromotionProcessorContext context, IEnumerable<string> applicableCodes)
Parameters
Type Name Description
TEntryPromotion promotionData

The promotion used to evaluate the product codes.

PromotionProcessorContext context

The context for the promotion processor evaluation.

System.Collections.Generic.IEnumerable<System.String> applicableCodes

A collection of product codes to be checked against a promotion.

Returns
Type Description
AffectedEntries

GetPromotionItems(TEntryPromotion)

Declaration
protected override PromotionItems GetPromotionItems(TEntryPromotion promotionData)
Parameters
Type Name Description
TEntryPromotion promotionData
Returns
Type Description
PromotionItems
Overrides
EPiServer.Commerce.Marketing.PromotionProcessorBase<TEntryPromotion>.GetPromotionItems(TEntryPromotion)

NotFulfilledRewardDescription(TEntryPromotion, PromotionProcessorContext, FulfillmentStatus)

Declaration
protected override RewardDescription NotFulfilledRewardDescription(TEntryPromotion promotionData, PromotionProcessorContext context, FulfillmentStatus fulfillmentStatus)
Parameters
Type Name Description
TEntryPromotion promotionData
PromotionProcessorContext context
FulfillmentStatus fulfillmentStatus
Returns
Type Description
RewardDescription
Overrides
EPiServer.Commerce.Marketing.PromotionProcessorBase<TEntryPromotion>.NotFulfilledRewardDescription(TEntryPromotion, EPiServer.Commerce.Marketing.PromotionProcessorContext, EPiServer.Commerce.Marketing.FulfillmentStatus)

Implements