Skip to content

ProducersFilter

The ProducersFilter object represents a producers filter in the storefront.

classDiagram
  direction LR
  ProducersFilter --> ProducersFilterValuesList
  class ProducersFilter{
    string name
    bool isActive
    bool hasCounters
    bool isSingleChoiceOnly
    int limit
    ProducersFilterValuesList values
  }
  class ProducersFilterValuesList{
  }

Properties

Attribute name Type Description
name string The name of the producers filter.
isActive bool Returns true if producers filter is active.
hasCounters bool Returns true if producers filter has counter that represents amount of producers meeting the criteria.
isSingleChoiceOnly bool Returns true if producers filter is single choice.
limit int Number of visible options in the filter.
values ProducersFilterValuesList Returns ProducersFilterValuesList object that represents list of producers filters values.

Examples

name property

{{ producersFilter.name }}
example name

isActive property

{{ producersFilter.isActive }}
true

hasCounters property

{{ producersFilter.hasCounters }}
true

isSingleChoiceOnly property

{{ producersFilter.isSingleChoiceOnly }}
true

limit property

{{ producersFilter.limit }}
4

values property

{% for filter in producersFilter.values %}
  <p>name: {{ filter.name }}</p>
{% endfor %}
<p>name: example producers filter name 1</p>
<p>name: example producers filter name 2</p>
<p>name: example producers filter name 3</p>