Class BuyQuantityGetFreeItemsProcessor

The processor responsible for evaluating if a promotion of type BuyQuantityGetFreeItems should apply a reward to an order group.

Implements
Namespace: EPiServer.Commerce.Marketing.Promotions
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public class BuyQuantityGetFreeItemsProcessor : GetFreeItemsProcessorBase<BuyQuantityGetFreeItems>, IPromotionProcessor

Constructors

BuyQuantityGetFreeItemsProcessor(CollectionTargetEvaluator, FulfillmentEvaluator, LocalizationService)

Creates an instance of BuyQuantityGetFreeItemsProcessor.

Declaration
public BuyQuantityGetFreeItemsProcessor(CollectionTargetEvaluator targetEvaluator, FulfillmentEvaluator fulfillmentEvaluator, LocalizationService localizationService)
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.

Methods

GetAffectedEntries(BuyQuantityGetFreeItems, PromotionProcessorContext, IEnumerable<String>)

Declaration
protected override AffectedEntries GetAffectedEntries(BuyQuantityGetFreeItems promotionData, PromotionProcessorContext context, IEnumerable<string> applicableCodes)
Parameters
Type Name Description
BuyQuantityGetFreeItems promotionData
PromotionProcessorContext context
System.Collections.Generic.IEnumerable<System.String> applicableCodes
Returns
Type Description
AffectedEntries
Overrides
EPiServer.Commerce.Marketing.Promotions.GetFreeItemsProcessorBase<EPiServer.Commerce.Marketing.Promotions.BuyQuantityGetFreeItems>.GetAffectedEntries(EPiServer.Commerce.Marketing.Promotions.BuyQuantityGetFreeItems, EPiServer.Commerce.Marketing.PromotionProcessorContext, System.Collections.Generic.IEnumerable<System.String>)

GetRedemptions(BuyQuantityGetFreeItems, PromotionProcessorContext, IEnumerable<String>)

Gets all AffectedEntriess affected by a given promotion.

Declaration
[Obsolete("This method is no longer used, will remain at least until September 2017.")]
protected IEnumerable<RedemptionDescription> GetRedemptions(BuyQuantityGetFreeItems promotionData, PromotionProcessorContext context, IEnumerable<string> applicableCodes)
Parameters
Type Name Description
BuyQuantityGetFreeItems 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

Implements