Table of Contents

Class FacetGroupViewModelSettings

Namespace
Dynamicweb.Ecommerce
Assembly
Dynamicweb.Ecommerce.dll

Controls how a FacetGroupViewModel is built, including which facet groups and options are loaded.

public class FacetGroupViewModelSettings : ViewSettingsBaseCurrencyBase<FacetGroupViewModel>
Inheritance
FacetGroupViewModelSettings
Inherited Members

Constructors

FacetGroupViewModelSettings()

Initializes a new instance of FacetGroupViewModelSettings with default settings. Used by the Web API infrastructure when deserializing settings from a request.

public FacetGroupViewModelSettings()

FacetGroupViewModelSettings(string, string, string, string, int)

Initializes a new instance of FacetGroupViewModelSettings with currency and shop context.

public FacetGroupViewModelSettings(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 (e.g. "EUR").

countryCode string

The ISO 3166-1 alpha-2 country code (e.g. "DE").

shopId string

The ID of the shop providing the pricing context.

userId int

The ID of the current user.

Properties

FacetGroupNames

Gets or sets an optional list of facet group names to load. When set, only groups whose name matches an entry in this list are returned; an empty or null list loads all available groups.

public IList<string> FacetGroupNames { get; set; }

Property Value

IList<string>

FacetSettings

Gets or sets the settings that control how each FacetViewModel inside Facets is populated. Automatically initialised by EnsureFilledPropertiesExist().

public FacetViewModelSettings FacetSettings { get; set; }

Property Value

FacetViewModelSettings

IncludeFacetOptionsWithNoResults

Gets or sets a value indicating whether facet options that match zero products are included in the output.

public bool IncludeFacetOptionsWithNoResults { get; set; }

Property Value

bool

Remarks

Set to true to show all possible filter options regardless of current search results — useful for displaying a consistent filter UI even when some options temporarily return no hits. Defaults to false, which hides empty options.

Methods

EnsureFilledPropertiesExist()

Ensures that FacetSettings 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