Table of Contents

Class PriceViewModelSettings

Namespace
Dynamicweb.Ecommerce.ProductCatalog
Assembly
Dynamicweb.Ecommerce.dll

Controls which pricing context is used when building a PriceViewModel.

public class PriceViewModelSettings : ViewSettingsBaseCurrencyBase<PriceViewModel>
Inheritance
PriceViewModelSettings
Inherited Members

Remarks

PriceViewModelSettings is typically created and managed automatically by ProductViewModelSettings — you only need to create one directly when building a standalone PriceViewModel outside of the product-list pipeline.

Constructors

PriceViewModelSettings()

Initializes a new instance of PriceViewModelSettings with default settings. Used by the Web API infrastructure when deserializing settings from a request.

public PriceViewModelSettings()

PriceViewModelSettings(string, string, string, string, int)

Initializes price settings for the given user and shop context.

public PriceViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId)

Parameters

languageId string

The language ID used to resolve localised values (e.g. "LANG1").

currencyCode string

ISO 4217 currency code (e.g. "EUR").

countryCode string

ISO 3166-1 alpha-2 country code used for VAT calculation (e.g. "DE").

shopId string

The shop ID used to scope pricing rules.

userId int

The user ID used to apply user-group discounts.

PriceViewModelSettings(string, string, string, string, int, bool, DateTime?, long)

Initializes price settings with full control over VAT display, order time, and stock location.

public PriceViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId, bool pricesWithVat, DateTime? time, long stockLocationId)

Parameters

languageId string

The language ID used to resolve localised values.

currencyCode string

ISO 4217 currency code.

countryCode string

ISO 3166-1 alpha-2 country code.

shopId string

The shop ID used to scope pricing rules.

userId int

The user ID used to apply user-group discounts.

pricesWithVat bool

true to display prices including VAT; false for ex-VAT.

time DateTime?

The order date/time used for time-limited price rules; null uses the current time.

stockLocationId long

The stock location ID used for location-specific pricing; 0 for the default location.

PriceViewModelSettings(string, string, string, string, int, bool, DateTime?, long, bool)

Initializes price settings with full control including reverse-charge VAT.

public PriceViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId, bool pricesWithVat, DateTime? time, long stockLocationId, bool reverseChargeForVat)

Parameters

languageId string

The language ID used to resolve localised values.

currencyCode string

ISO 4217 currency code.

countryCode string

ISO 3166-1 alpha-2 country code.

shopId string

The shop ID used to scope pricing rules.

userId int

The user ID used to apply user-group discounts.

pricesWithVat bool

true to display prices including VAT.

time DateTime?

The order date/time used for time-limited price rules; null uses the current time.

stockLocationId long

The stock location ID for location-specific pricing; 0 for the default location.

reverseChargeForVat bool

true when the buyer is responsible for VAT (B2B reverse charge).

See Also

To top