Class ProductListViewModelSettings
- Namespace
- Dynamicweb.Ecommerce.ProductCatalog
- Assembly
- Dynamicweb.Ecommerce.dll
public class ProductListViewModelSettings : ViewSettingsBaseCurrencyBase<ProductListViewModel>
- Inheritance
-
ProductListViewModelSettings
- Inherited Members
Constructors
ProductListViewModelSettings()
Empty constructor for webapi
public ProductListViewModelSettings()
ProductListViewModelSettings(string, string, string, string, int)
Creates a configuration for constructing product viewmodels.
public ProductListViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId)
Parameters
languageIdstring- Id of language
currencyCodestring- CurrencyCode
countryCodestring- Country code2
shopIdstring- Shop ID.
userIdint- User id
ProductListViewModelSettings(string, string, string, string, int, bool, DateTime?, long)
Creates a configuration for constructing product viewmodels.
public ProductListViewModelSettings(string languageId, string currencyCode, string countryCode, string shopId, int userId, bool showPricesWithVat, DateTime? time, long stockLocationId)
Parameters
languageIdstring- Id of language
currencyCodestring- CurrencyCode
countryCodestring- Country code2
shopIdstring- Shop ID.
userIdint- User id
showPricesWithVatbool- Show prices with VAT
timeDateTime?- Ordertime for price calculation
stockLocationIdlong- Stocklocation for price
Properties
CurrentPage
Defines which page of the paginated resultset to return. Eg. PageSize of 10 and CurrentPage of 2 in a resultset of 30, returns result item #11 to #20.
public int CurrentPage { get; set; }
Property Value
FacetGroupSettings
Configures how the facetgroups view should be configured, if they are used to fill the list. If this is used from the WebAPI, the query parameter name has to extend which property of FacetGroupViewModelSettings should be set, such as FacetGroupSettings.FilledProperties=FacetGroupType.
public FacetGroupViewModelSettings FacetGroupSettings { get; set; }
Property Value
- FacetGroupViewModelSettings
- configurationOfFacetGroups
GroupSettings
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 ProductGroupViewModelSettings should be set, such as GroupSettings.FilledProperties=Title.
public ProductGroupViewModelSettings GroupSettings { get; set; }
Property Value
- ProductGroupViewModelSettings
- configurationOfPriceViewModel
MediaSettings
Configures how multimedia content is handled.
public MediaViewModelSettings MediaSettings { get; set; }
Property Value
- MediaViewModelSettings
- mediaSettings
PageSize
Limits the number of products in the returned view
public int PageSize { get; set; }
Property Value
Parameters
Additional parameters to be used for the creation of the product list.
public Dictionary<string, string> Parameters { get; set; }
Property Value
- Dictionary<string, string>
- parameters
ProductSettings
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 ProductViewModelSettings should be set, such as ProductSettings.FilledProperties=Id.
public ProductViewModelSettings ProductSettings { get; set; }
Property Value
- ProductViewModelSettings
- configurationOfPriceViewModel
Methods
EnsureFilledPropertiesExist()
If filled properties are empty, this method will add ALL valid property names.
public override void EnsureFilledPropertiesExist()