Class ReadOnlyPricingLoader

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

Constructors

ReadOnlyPricingLoader(IContentLoader, IPriceService, ReferenceConverter, ICatalogSystem)

Creates an instance of ReadOnlyPricingLoader.

Declaration
[Obsolete("Use the constructor with currentMarketService instead. Will remain at least until November 2016.", false)]
public ReadOnlyPricingLoader(IContentLoader contentLoader, IPriceService priceService, ReferenceConverter referenceConverter, ICatalogSystem catalogSystem)
Parameters
Type Name Description
EPiServer.IContentLoader contentLoader

The content loader to fetch proces from.

IPriceService priceService

The price service.

ReferenceConverter referenceConverter

The reference converter.

ICatalogSystem catalogSystem

The catalog system.

ReadOnlyPricingLoader(IContentLoader, IPriceService, ReferenceConverter, ICatalogSystem, ICurrentMarket, CustomerContext)

Creates an instance of ReadOnlyPricingLoader.

Declaration
public ReadOnlyPricingLoader(IContentLoader contentLoader, IPriceService priceService, ReferenceConverter referenceConverter, ICatalogSystem catalogSystem, ICurrentMarket currentMarketService, CustomerContext customerContext)
Parameters
Type Name Description
EPiServer.IContentLoader contentLoader

The content loader to fetch proces from.

IPriceService priceService

The price service.

ReferenceConverter referenceConverter

The reference converter.

ICatalogSystem catalogSystem

The catalog system.

ICurrentMarket currentMarketService

The current market service.

CustomerContext customerContext

The customer context.

ReadOnlyPricingLoader(IContentLoader, IPriceService, ReferenceConverter, ICatalogSystem, ICurrentMarket, SecurityContext, CustomerContext, FrameworkContext)

Creates an instance of ReadOnlyPricingLoader.

Declaration
[Obsolete("Use the constructor without SecurityContext and FrameworkContext instead. Will remain at least until October 2017.", false)]
public ReadOnlyPricingLoader(IContentLoader contentLoader, IPriceService priceService, ReferenceConverter referenceConverter, ICatalogSystem catalogSystem, ICurrentMarket currentMarketService, SecurityContext securityContext, CustomerContext customerContext, FrameworkContext frameworkContext)
Parameters
Type Name Description
EPiServer.IContentLoader contentLoader

The content loader to fetch proces from.

IPriceService priceService

The price service.

ReferenceConverter referenceConverter

The reference converter.

ICatalogSystem catalogSystem

The catalog system.

ICurrentMarket currentMarketService

The current market service.

SecurityContext securityContext

The security context.

CustomerContext customerContext

The customer context.

FrameworkContext frameworkContext

The framework context.

Methods

GetChildrenPrices(ContentReference, MarketId, CustomerPricing, Int32, Int32, out Int32)

Gets the prices of child variants.

Declaration
[Obsolete("Do not use this method. The IPriceService does not support paging, and this method fetches all results and pages in the application. Use the IPriceDetailService if database-side paging is necessary. Will remain at least until November 2016.")]
public ItemCollection<Price> GetChildrenPrices(ContentReference parentLink, MarketId marketId, CustomerPricing customerPricing, int startIndex, int numberOfRecord, out int total)
Parameters
Type Name Description
EPiServer.Core.ContentReference parentLink

The parent catalog node.

MarketId marketId

The market id. Pass emtpy marketId to get prices for all markets.

CustomerPricing customerPricing

The customer pricing. Pass emtpy customer pricing to get prices for all customers.

System.Int32 startIndex

The start index of record to retreive.

System.Int32 numberOfRecord

The number of record to retreive.

System.Int32 total

The number of total record that is available.

Returns
Type Description
ItemCollection<Price>

Collection of prices detail of children of a catalog node.

GetCustomerPrices(ContentReference)

Gets the prices for the current user.

Declaration
public virtual ItemCollection<Price> GetCustomerPrices(ContentReference contentLink)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

The content link for a catalog entry.

Returns
Type Description
ItemCollection<Price>

Price definition for the catalog entry

Remarks

This method will get the currency for the current user on current market.

GetCustomerPrices(ContentReference, Currency, Nullable<Decimal>, Nullable<Boolean>)

Gets the prices for the current user.

Declaration
public virtual ItemCollection<Price> GetCustomerPrices(ContentReference contentLink, Currency currency, decimal? quantity, bool? returnCustomerPricing)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

The content link for a catalog entry.

Currency currency

The currency to use when receiving the price. Use null or Currency.Empty to get the current currency for the user.

System.Nullable<System.Decimal> quantity

The quantity to filter on. If null, prices for all quantities will be returned.

System.Nullable<System.Boolean> returnCustomerPricing

True if customer pricing should be returned. If null, the parameter will be true if user has logged in to the site.

Returns
Type Description
ItemCollection<Price>

Price definition for the catalog entry

Remarks

This method will use the current market when receiving the prices.

GetDefaultPrice(ContentReference)

Gets the default price from the price service.

Declaration
public Price GetDefaultPrice(ContentReference contentLink)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

The content link for a catalog entry.

Returns
Type Description
Price

Price definition for the catalog entry

Remarks

This method will get the currency for the current user on current market.

GetDefaultPrice(ContentReference, Currency)

Gets the default price from the price service.

Declaration
public virtual Price GetDefaultPrice(ContentReference contentLink, Currency currency)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

The content link for a catalog entry.

Currency currency

The currency to use when receiving the price.

Returns
Type Description
Price

GetDefaultPrice(ContentReference, Currency, DateTime)

Gets the default price from the price service.

Declaration
public virtual Price GetDefaultPrice(ContentReference contentLink, Currency currency, DateTime validOn)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

The content link for a catalog entry.

Currency currency

The currency to use when receiving the price.

System.DateTime validOn

The date and time, in UTC, that the price is valid on.

Returns
Type Description
Price

Price definition for the catalog entry

GetDefaultPrice(ContentReference, MarketId, Currency, DateTime)

Gets the default price from the price service.

Declaration
public virtual Price GetDefaultPrice(ContentReference contentLink, MarketId marketId, Currency currency, DateTime validOn)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

The content link for a catalog entry.

MarketId marketId

The market id.

Currency currency

The currency to use when receiving the price.

System.DateTime validOn

The date and time, in UTC, that the price is valid on.

Returns
Type Description
Price

Price definition for the catalog entry.

GetDefaultPrice(ContentReference, DateTime)

Gets the default price from the price service.

Declaration
public virtual Price GetDefaultPrice(ContentReference contentLink, DateTime validOn)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

The content link for a catalog entry.

System.DateTime validOn

The date and time, in UTC, that the price is valid on.

Returns
Type Description
Price

Price definition for the catalog entry

Remarks

This method will get the currency for the current user on current market.

GetPrices(ContentReference, MarketId, CustomerPricing)

Gets the prices for the specified contentLink.

Declaration
public ItemCollection<Price> GetPrices(ContentReference contentLink, MarketId marketId, CustomerPricing customerPricing)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

Reference to the content to get prices for.

MarketId marketId

The market id. Pass emtpy marketId to get prices for all markets.

CustomerPricing customerPricing

The customer pricing. Pass emtpy customer pricing to get prices for all customers.

Returns
Type Description
ItemCollection<Price>

Collection of prices for the content.

GetPrices(ContentReference, MarketId, IEnumerable<CustomerPricing>)

Gets the prices for the specified contentLink.

Declaration
public virtual ItemCollection<Price> GetPrices(ContentReference contentLink, MarketId marketId, IEnumerable<CustomerPricing> customerPricings)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

Reference to the content to get prices for.

MarketId marketId

The market id. Pass emtpy marketId to get prices for all markets.

System.Collections.Generic.IEnumerable<CustomerPricing> customerPricings

List of the customer pricing. Pass emtpy list to get prices for all customers.

Returns
Type Description
ItemCollection<Price>

Collection of prices for the content.

GetPrices(IEnumerable<EntryContentBase>, MarketId, PriceFilter)

Gets the prices from list of entry contents.

Declaration
public virtual ItemCollection<Price> GetPrices(IEnumerable<EntryContentBase> entryContents, MarketId marketId, PriceFilter priceFilter)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<EntryContentBase> entryContents

The entry contents.

MarketId marketId

The market id.

PriceFilter priceFilter

The price filter.

Returns
Type Description
ItemCollection<Price>

GetPrices(IEnumerable<EntryContentBase>, MarketId, IEnumerable<CustomerPricing>)

Gets the prices from list of entry contents.

Declaration
public virtual ItemCollection<Price> GetPrices(IEnumerable<EntryContentBase> entryContents, MarketId marketId, IEnumerable<CustomerPricing> customerPricings)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<EntryContentBase> entryContents

The entry contents.

MarketId marketId

The market id.

System.Collections.Generic.IEnumerable<CustomerPricing> customerPricings

List of the customer pricings.

Returns
Type Description
ItemCollection<Price>