Skip to content

FilterValue

The FilterValue object represents values of a regular filter in the storefront, eg. Rate Filter.

classDiagram
  direction LR
  FilterValue --> Url
  class FilterValue{
    string name
    bool isActive
    string value
    string urlKey
    ?int counter
    Url urlWithFilterValueRemoved
    Url urlWithSingleFilterValue
    ?Url urlWithFilterValueAdded
  }
  class Url{
  }

Properties

Attribute name Type Description
name string The name of the filter.
isActive bool Returns true if filter value is active.
urlValue string Represents a value of the filter used to build target URL.
urlKey string Represents URL key for filter value.
counter null|int Represents amount of found products meeting the criteria.
urlWithFilterValueRemoved Url Returns Url object that represents link with filter value removed.
urlWithSingleFilterValue Url Returns Url object that represents link with single filter value.
urlWithFilterValueAdded null|Url Returns Url object that represents link with filter value added.

Examples

name property

{{ filterValue.name }}
example name

isActive property

{{ filterValue.isActive }}
true

urlValue property

{{ filterValue.urlValue }}
1

urlKey property

{{ filterValue.urlKey }}
f_producer_46

counter property

{{ filterValue.counter }}
3

urlWithFilterValueRemoved property

{{ filterValue.urlWithFilterValueRemoved }}
/url/with/filter/value/removed

urlWithSingleFilterValue property

{{ filterValue.urlWithSingleFilterValue }}
/url/with/single/filter/value

urlWithFilterValueAdded property

{{ filterValue.urlWithFilterValueAdded }}
/url/with/filter/value/added