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

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: 12.17.2
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
[Obsolete("This constructor is obsolete. Use the constructor with RedemptionDescriptionFactory instead. This will remain until at least October 2018.")]
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.

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

Declaration
public GetFreeItemsProcessorBase(CollectionTargetEvaluator targetEvaluator, FulfillmentEvaluator fulfillmentEvaluator, LocalizationService localizationService, Func<TEntryPromotion, PurchaseQuantity> conditionGetter, RedemptionDescriptionFactory redemptionDescriptionFactory)
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.

RedemptionDescriptionFactory redemptionDescriptionFactory

Factory for creating RedemptionDescriptions.

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)

GetRedemptions(TEntryPromotion, PromotionProcessorContext, IEnumerable<String>)

Gets all AffectedEntriess affected by a given promotion.

Declaration
protected override IEnumerable<RedemptionDescription> GetRedemptions(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
System.Collections.Generic.IEnumerable<RedemptionDescription>

A list of applicable RedemptionDescriptions.

Overrides
EPiServer.Commerce.Marketing.EntryPromotionProcessorBase<TEntryPromotion>.GetRedemptions(TEntryPromotion, EPiServer.Commerce.Marketing.PromotionProcessorContext, System.Collections.Generic.IEnumerable<System.String>)

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