Class ProductViewModelSettings
- Namespace
- Dynamicweb.Ecommerce.ProductCatalog
- Assembly
- Dynamicweb.Ecommerce.dll
Configuration of how a product viewmodel should be created.
public class ProductViewModelSettings : ViewSettingsBaseCurrencyBase<ProductViewModel>
- Inheritance
-
ProductViewModelSettings
- Inherited Members
Constructors
ProductViewModelSettings()
Empty constructor for webapi
public ProductViewModelSettings()
ProductViewModelSettings(string, string, string, string)
Creates a configuration for constructing product viewmodels.
public ProductViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId)
Parameters
languageId
string- Id of language
currencyCode
string- CurrencyCode
countryCode
string- Country code2
shopId
string- Shop id
ProductViewModelSettings(string, string, string, string, int)
Creates a configuration for constructing product viewmodels.
public ProductViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId)
Parameters
languageId
string- Id of language
currencyCode
string- CurrencyCode
countryCode
string- Country code2
shopId
string- Shop id
userId
int- User id
ProductViewModelSettings(string, string, string, string, int, bool)
Creates a configuration for constructing product viewmodels.
[Obsolete("Use other constructor", true)]
public ProductViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId, bool showPricesWithVat)
Parameters
languageId
string- Id of language
currencyCode
string- CurrencyCode
countryCode
string- Country code2
shopId
string- Shop id
userId
int- User id
showPricesWithVat
bool
ProductViewModelSettings(string, string, string, string, int, bool, DateTime?)
Creates a configuration for constructing product viewmodels.
[Obsolete("Use other constructor", true)]
public ProductViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId, bool showPricesWithVat, DateTime? time)
Parameters
languageId
stringcurrencyCode
stringcountryCode
stringshopId
stringuserId
intshowPricesWithVat
booltime
DateTime?
ProductViewModelSettings(string, string, string, string, int, bool, DateTime?, long)
Creates a configuration for constructing product viewmodels.
public ProductViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId, bool showPricesWithVat, DateTime? time, long stockLocationId)
Parameters
languageId
stringcurrencyCode
stringcountryCode
stringshopId
stringuserId
intshowPricesWithVat
booltime
DateTime?stockLocationId
long
Properties
AssetCategorySettings
The asset category settings. If this is used from the WebAPI, the query parameter name has to extend which property of AssetCategoryViewModelSettings should be set, such as AssetCategorySettings.FilledProperties=SystemName.
public AssetCategoryViewModelSettings AssetCategorySettings { get; set; }
Property Value
CategoryFieldSettings
The category field settings. If this is used from the WebAPI, the query parameter name has to extend which property of CategoryFieldViewModelSetting should be set, such as CategoryFieldSettings.FilledProperties=Name.
public CategoryFieldViewModelSetting CategoryFieldSettings { get; set; }
Property Value
GroupInfoSettings
The group info settings. If this is used from the WebAPI, the query parameter name has to extend which property of GroupInfoViewModelSettings should be set, such as GroupInfoSettings.FilledProperties=PrimaryPageId.
public GroupInfoViewModelSettings GroupInfoSettings { get; set; }
Property Value
LoadVariantInfoOnVariants
If disabled, variantinfos will not be loaded on product viewmodels if the product is a variant
public bool LoadVariantInfoOnVariants { get; set; }
Property Value
ManufacturerSettings
Configures how manufacturer view should be configured. If this is used from the WebAPI, the query parameter name has to extend which property of ManufacturerViewModelSettings should be set, such as ManufacturerSettings.FilledProperties=Logo.
public ManufacturerViewModelSettings ManufacturerSettings { get; set; }
Property Value
MediaSettings
Configures how multimedia content is handled. If this is used from the WebAPI, the query parameter name has to extend which property of MediaViewModelSettings should be set, such as MediaSettings.FilledProperties=Keywords.
public MediaViewModelSettings MediaSettings { get; set; }
Property Value
- MediaViewModelSettings
- mediaSettings
PriceSettings
Configures how the price view should be configured, if price is filled. If this is used from the WebAPI, the query parameter name has to extend which property of PriceViewModelSettings should be set, such as PriceSettings.FilledProperties=Price.
public PriceViewModelSettings PriceSettings { get; set; }
Property Value
- PriceViewModelSettings
- configurationOfPriceViewModel
ProductFieldSettings
The product field settings. If this is used from the WebAPI, the query parameter name has to extend which property of FieldValueViewModelSetting should be set, such as ProductFieldSettings.FilledProperties=SystemName.
public FieldValueViewModelSetting ProductFieldSettings { get; set; }
Property Value
StockUnitSettings
The stock unit settings. If this is used from the WebAPI, the query parameter name has to extend which property of StockUnitViewModelSettings should be set, such as StockUnitSettings.FilledProperties=UnitName.
public StockUnitViewModelSettings StockUnitSettings { get; set; }
Property Value
UnitOptionSettings
The unit option settings. If this is used from the WebAPI, the query parameter name has to extend which property of UnitOptionViewModelSettings should be set, such as UnitOptionSettings.FilledProperties=StockLevel.
public UnitOptionViewModelSettings UnitOptionSettings { get; }
Property Value
VariantInfoSettings
The variant info settings. If this is used from the WebAPI, the query parameter name has to extend which property of VariantInfoViewModelSettings should be set, such as VariantInfoSettings.FilledProperties=ProductID.
public VariantInfoViewModelSettings VariantInfoSettings { get; set; }
Property Value
Methods
EnsureFilledPropertiesExist()
If filled properties are empty, this method will add ALL valid property names.
public override void EnsureFilledPropertiesExist()