Skip to content

DeliveryFilter

The DeliveryFilter object represents a delivery filter in the storefront.

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

Properties

Attribute name Type Description
name string The name of the filter value.
isActive bool Returns true when filter is active.
hasCounters bool Returns true when filter has counter.
isSingleChoiceOnly bool Returns true when filter is single choice.
limit number Number of visible options in the filter.
values FilterValuesList The FilterValuesList object that represents list of FilterValue object.

Examples

name property

{{ deliveryFilter.name }}
example name

isActive property

{{ deliveryFilter.isActive }}
true

hasCounters property

{{ deliveryFilter.hasCounters }}
true

isSingleChoiceOnly property

{{ deliveryFilter.isSingleChoiceOnly }}
true

limit property

{{ deliveryFilter.limit }}
4

values property

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