Class DiscountViewModelSettings
- Namespace
- Dynamicweb.Ecommerce.ProductCatalog
- Assembly
- Dynamicweb.Ecommerce.dll
Controls how a DiscountViewModel is built, including the currency and pricing context and how the campaign image is populated.
public class DiscountViewModelSettings : ViewSettingsBaseCurrencyBase<DiscountViewModel>
- Inheritance
-
DiscountViewModelSettings
- Inherited Members
Constructors
DiscountViewModelSettings()
Initializes a new instance of DiscountViewModelSettings with default settings. Used by the Web API infrastructure when deserializing settings from a request.
public DiscountViewModelSettings()
DiscountViewModelSettings(string, string, string, string, int)
Initializes a new instance of DiscountViewModelSettings with currency and shop context.
public DiscountViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId)
Parameters
languageIdstringThe ID of the language used to resolve localised values.
currencyCodestringThe ISO 4217 currency code used for monetary discount amounts (e.g.
"EUR").countryCodestringThe ISO 3166-1 alpha-2 country code used for tax and pricing rules (e.g.
"DE").shopIdstringThe ID of the shop providing the pricing context.
userIdintThe ID of the current user, used to resolve user-specific pricing.
DiscountViewModelSettings(string, string, string, string, int, bool, DateTime?)
Initializes a new instance of DiscountViewModelSettings with full pricing context including VAT and a reference time.
public DiscountViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId, bool pricesWithVat, DateTime? time)
Parameters
languageIdstringThe ID of the language used to resolve localised values.
currencyCodestringThe ISO 4217 currency code used for monetary discount amounts (e.g.
"EUR").countryCodestringThe ISO 3166-1 alpha-2 country code used for tax and pricing rules (e.g.
"DE").shopIdstringThe ID of the shop providing the pricing context.
userIdintThe ID of the current user, used to resolve user-specific pricing.
pricesWithVatbooltrue to return prices inclusive of VAT; false for ex-VAT prices.
timeDateTime?The point in time at which pricing and validity are evaluated, or null to use the current time.
Properties
MediaSettings
Gets or sets the settings that control how the CampaignImage is populated. Automatically initialised by EnsureFilledPropertiesExist().
public MediaViewModelSettings MediaSettings { get; set; }
Property Value
Methods
EnsureFilledPropertiesExist()
Ensures that MediaSettings is initialised and configured before the view model is built. Called automatically by the view model builder pipeline.
public override void EnsureFilledPropertiesExist()