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

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: 12.17.2
Syntax
public class PromotionEngineContentLoader

Constructors

PromotionEngineContentLoader(IContentLoader, CampaignInfoExtractor, IPriceService, ReferenceConverter)

Initializes a new instance of the PromotionEngineContentLoader class.

Declaration
public PromotionEngineContentLoader(IContentLoader contentLoader, CampaignInfoExtractor campaignInfoExtractor, IPriceService priceService, ReferenceConverter referenceConverter)
Parameters
Type Name Description
EPiServer.IContentLoader contentLoader

Service used to load content data.

CampaignInfoExtractor campaignInfoExtractor

Used to extract informations about campaigns and promotions.

IPriceService priceService

The price service.

ReferenceConverter referenceConverter

The reference converter.

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.

GetPromotions(ContentReference)

Gets all existing promotions under a sales campaign.

Declaration
public virtual IEnumerable<PromotionData> GetPromotions(ContentReference campaignLink)
Parameters
Type Name Description
EPiServer.Core.ContentReference campaignLink

The campaign link.

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

All PromotionData for an especific campaign.

GetPromotions(IEnumerable<ContentReference>)

Gets promotions from specific campaigns.

Declaration
public virtual IEnumerable<PromotionData> GetPromotions(IEnumerable<ContentReference> campaignLinks)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> campaignLinks

The campaign links.

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

All PromotionData for specified campaigns.

TryGetDefaultPriceAmount(String, MarketId, Currency, DateTime, out Decimal)

Gets the default price amount.

Declaration
protected virtual bool TryGetDefaultPriceAmount(string entryCode, MarketId marketId, Currency currency, DateTime validOn, out decimal priceAmount)
Parameters
Type Name Description
System.String entryCode

The entry code.

MarketId marketId

The market id.

Currency currency

The currency.

System.DateTime validOn

The valid date.

System.Decimal priceAmount

The output price amount.

Returns
Type Description
System.Boolean

true if found entry price; otherwise, false