Table of Contents

Class ProductSearchFilter

Namespace
Dynamicweb.Ecommerce.Products
Assembly
Dynamicweb.Ecommerce.dll

Describes which products to return, and in which order and page size, when searching products in the database.

public sealed class ProductSearchFilter
Inheritance
ProductSearchFilter
Inherited Members

Properties

ActiveFilter

Limits the result to active or inactive products. No limit is applied when not set.

public ProductSearchFilter.ActiveStateFilter? ActiveFilter { get; set; }

Property Value

ProductSearchFilter.ActiveStateFilter?

AssortmentIds

Limits the result to the products of the given assortments, as resolved by the last assortment build.

public IEnumerable<string> AssortmentIds { get; set; }

Property Value

IEnumerable<string>

CreatedFrom

Limits the result to the products created at or after the given date.

public DateTime? CreatedFrom { get; set; }

Property Value

DateTime?

CreatedTo

Limits the result to the products created at or before the given date.

public DateTime? CreatedTo { get; set; }

Property Value

DateTime?

GroupIds

Limits the result to the products related to the given product groups.

public IEnumerable<string> GroupIds { get; set; }

Property Value

IEnumerable<string>

IncludeOrphanedProducts

Gets or sets a value indicating whether products without any shop relation are included when the result is limited by GroupIds or ShopType.

public bool IncludeOrphanedProducts { get; set; }

Property Value

bool

LanguageIds

Limits the result to the products in the given languages.

public IEnumerable<string> LanguageIds { get; set; }

Property Value

IEnumerable<string>

OrderBy

Gets or sets the column to sort by, for example ProductName or GroupProductRelationSorting. Defaults to ProductName when not set.

public string? OrderBy { get; set; }

Property Value

string

OrderByDirection

Gets or sets the sort direction. DESC sorts descending, any other value sorts ascending.

public string? OrderByDirection { get; set; }

Property Value

string

PageNumber

Gets or sets the one-based page to return.

public int PageNumber { get; set; }

Property Value

int

PageSize

Gets or sets the number of products per page.

public int PageSize { get; set; }

Property Value

int

SearchFields

Gets or sets the product columns SearchValue is matched against. Defaults to product number, name, short description and long description when empty. Ignored when SearchInAllFields is true.

public IEnumerable<string> SearchFields { get; set; }

Property Value

IEnumerable<string>

SearchInAllFields

Gets or sets a value indicating whether SearchValue is matched against every product column instead of the fields given by SearchFields.

public bool SearchInAllFields { get; set; }

Property Value

bool

SearchValue

Gets or sets the value to search for. The product id is always matched exactly; the remaining fields are matched with a contains. Comma separated values are treated as tokens that must all match, unless SearchInAllFields is true.

public string? SearchValue { get; set; }

Property Value

string

ShopType

Limits the result to the products in shops of the given type. No limit is applied when not set.

public ShopType? ShopType { get; set; }

Property Value

ShopType?

UpdatedFrom

Limits the result to the products updated at or after the given date.

public DateTime? UpdatedFrom { get; set; }

Property Value

DateTime?

UpdatedTo

Limits the result to the products updated at or before the given date.

public DateTime? UpdatedTo { get; set; }

Property Value

DateTime?

VariantFilter

Limits the result to master products or variants. No limit is applied when not set.

public ProductSearchFilter.VariantStateFilter? VariantFilter { get; set; }

Property Value

ProductSearchFilter.VariantStateFilter?
To top