Class PromotionEngineContentLoader

Gets and sorts available promotions and reference data used by the PromotionEngine.

Inheritance
System.Object
PromotionEngineContentLoader
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.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public class PromotionEngineContentLoader

Constructors

PromotionEngineContentLoader(IContentLoader, CampaignInfoExtractor, ReadOnlyPricingLoader)

Initializes a new instance of the PromotionEngineContentLoader class.

Declaration
public PromotionEngineContentLoader(IContentLoader contentLoader, CampaignInfoExtractor campaignInfoExtractor, ReadOnlyPricingLoader readOnlyPricingLoader)
Parameters
Type Name Description
EPiServer.IContentLoader contentLoader

Service used to load content data.

CampaignInfoExtractor campaignInfoExtractor

Used to extract informations about campaigns and promotions.

ReadOnlyPricingLoader readOnlyPricingLoader

Service for getting a product's placed price.

Methods

CreateInMemoryOrderGroup(ContentReference, IMarket, Currency)

Creates a new in-memory order group and adds a line item using the entryLink.

Declaration
public virtual IOrderGroup CreateInMemoryOrderGroup(ContentReference entryLink, IMarket market, Currency marketCurrency)
Parameters
Type Name Description
EPiServer.Core.ContentReference entryLink

The EPiServer.Core.ContentReference of the entry content to put in the order group.

IMarket market

The market to associate the order group with.

Currency marketCurrency

The market currency to use for the order group.

Returns
Type Description
IOrderGroup

Creates an InMemoryOrderGroup for a specific market and currency adding a single ILineItem for the provided entryLink.

GetAppliedPromotions(IOrderGroup)

Gets the promotions applied to a IOrderGroup.

Declaration
public virtual IList<PromotionData> GetAppliedPromotions(IOrderGroup orderGroup)
Parameters
Type Name Description
IOrderGroup orderGroup

The IOrderGroup for which to load promotions.

Returns
Type Description
System.Collections.Generic.IList<PromotionData>

All PromotionData that have been applied to the IOrderGroup.

GetCampaignFolderRoot()

Get the link to the campaign folder root.

Declaration
protected virtual ContentReference GetCampaignFolderRoot()
Returns
Type Description
EPiServer.Core.ContentReference

The content link to the campaign folder root.

GetEvaluablePromotionsInPriorityOrder(IMarket)

Gets the evaluable promotions in priority order.

Declaration
public virtual IList<PromotionData> GetEvaluablePromotionsInPriorityOrder(IMarket market)
Parameters
Type Name Description
IMarket market

The current market.

Returns
Type Description
System.Collections.Generic.IList<PromotionData>

All valid promotions for a given market, sorted by priority.

GetPromotions()

Gets all existing promotions.

Declaration
public virtual IEnumerable<PromotionData> GetPromotions()
Returns
Type Description
System.Collections.Generic.IEnumerable<PromotionData>

All PromotionData for all campaigns.