Skip to content

AvailabilitiesFilter

The AvailabilitiesFilter object represents a availabilities filter in the storefront.

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

Properties

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

Examples

name property

{{ availabilitiesFilter.name }}
example name

isActive property

{{ availabilitiesFilter.isActive }}
true

hasCounters property

{{ availabilitiesFilter.hasCounters }}
true

isSingleChoiceOnly property

{{ availabilitiesFilter.isSingleChoiceOnly }}
true

limit property

{{ availabilitiesFilter.limit }}
3

values property

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