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
languageIdstringThe language ID used to resolve localised values (e.g.
"LANG1").currencyCodestringISO 4217 currency code (e.g.
"EUR").countryCodestringISO 3166-1 alpha-2 country code used for VAT calculation (e.g.
"DE").shopIdstringThe shop ID used to scope pricing rules.
userIdintThe 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
languageIdstringThe language ID used to resolve localised values.
currencyCodestringISO 4217 currency code.
countryCodestringISO 3166-1 alpha-2 country code.
shopIdstringThe shop ID used to scope pricing rules.
userIdintThe user ID used to apply user-group discounts.
pricesWithVatbooltimeDateTime?The order date/time used for time-limited price rules; null uses the current time.
stockLocationIdlongThe stock location ID used for location-specific pricing;
0for 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
languageIdstringThe language ID used to resolve localised values.
currencyCodestringISO 4217 currency code.
countryCodestringISO 3166-1 alpha-2 country code.
shopIdstringThe shop ID used to scope pricing rules.
userIdintThe user ID used to apply user-group discounts.
pricesWithVatbooltrue to display prices including VAT.
timeDateTime?The order date/time used for time-limited price rules; null uses the current time.
stockLocationIdlongThe stock location ID for location-specific pricing;
0for the default location.reverseChargeForVatbooltrue when the buyer is responsible for VAT (B2B reverse charge).