Table of Contents

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

languageId string

The ID of the language used to resolve localised values.

currencyCode string

The ISO 4217 currency code used for monetary discount amounts (e.g. "EUR").

countryCode string

The ISO 3166-1 alpha-2 country code used for tax and pricing rules (e.g. "DE").

shopId string

The ID of the shop providing the pricing context.

userId int

The 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

languageId string

The ID of the language used to resolve localised values.

currencyCode string

The ISO 4217 currency code used for monetary discount amounts (e.g. "EUR").

countryCode string

The ISO 3166-1 alpha-2 country code used for tax and pricing rules (e.g. "DE").

shopId string

The ID of the shop providing the pricing context.

userId int

The ID of the current user, used to resolve user-specific pricing.

pricesWithVat bool

true to return prices inclusive of VAT; false for ex-VAT prices.

time DateTime?

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

MediaViewModelSettings

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()

See Also

To top