Class ProductGroupViewModelSettings
- Namespace
- Dynamicweb.Ecommerce.ProductCatalog
- Assembly
- Dynamicweb.Ecommerce.dll
Controls which properties are populated on a ProductGroupViewModel, including media settings and custom field settings.
public class ProductGroupViewModelSettings : ViewSettingsBaseCurrencyBase<ProductGroupViewModel>
- Inheritance
-
ProductGroupViewModelSettings
- Inherited Members
Constructors
ProductGroupViewModelSettings()
Initializes a new instance of ProductGroupViewModelSettings with default settings. Used by the Web API infrastructure when deserializing settings from a request.
public ProductGroupViewModelSettings()
ProductGroupViewModelSettings(string, string, string, string, int)
Initializes group view model settings for the given language, currency, and user context.
public ProductGroupViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId)
Parameters
languageIdstringThe language ID used for localised field values (e.g.
"LANG1").currencyCodestringISO 4217 currency code (e.g.
"EUR").countryCodestringISO 3166-1 alpha-2 country code (e.g.
"DE").shopIdstringThe shop ID used to scope the group hierarchy.
userIdintThe user ID used to apply user-group access rules.
Properties
FieldSettings
Gets or sets the configuration that controls which custom group fields are populated. Automatically initialised by EnsureFilledPropertiesExist() when null.
public FieldValueViewModelSetting FieldSettings { get; set; }
Property Value
MediaSettings
Gets or sets how media assets are handled when populating group media. Automatically initialised by EnsureFilledPropertiesExist() when null.
public MediaViewModelSettings MediaSettings { get; set; }
Property Value
Methods
EnsureFilledPropertiesExist()
Called automatically by the view model builder pipeline. Ensures that MediaSettings and FieldSettings are initialised and that all filled property lists are populated.
public override void EnsureFilledPropertiesExist()