filter
To learn about supporting filters in your theme, refer to Support storefront filtering.
Properties
- active_
values array of filter_value The values of the filter that are currently active.
The array can have values only for
booleanandlisttype filters.- false_
value The
falsefilter value.Returns a value for
booleantype filters if the unfiltered view has at least one result with thefalsefilter value. Otherwise, it returnsnil.- inactive_
values array of filter_value The values of the filter that are currently inactive.
The array can have values only for
booleanandlisttype filters.- max_
value The highest filter value.
Returns a value only for
type filters. Returnsnilfor other types.- min_
value The lowest filter value.
Returns a value only for
type filters. Returnsnilfor other types.The logical operator used by the filter. Returns a value only for
booleanandlisttype filters. Returnsnilfor other types.Example: For a filter named
colorwith valuesredandblue:- If the operator is
, it will filter items that are both red and blue. - If the operator is
, it will filter items that are either red or blue or both.
Filters that support the
operator:- Product tags
- Metafields of type
and
Possible values Description AND Includes products that match all buyer selections. OR Includes products that match at least one buyer selection. - If the operator is
Describes how to present the filter values.
Returns a value only for
listtype filters. Returnsnilfor other types.Possible values image swatch text The highest product price within the collection or search results.
Returns a value only for
type filters. Returnsnilfor other types.- true_
value The
truefilter value.Returns a value for
booleantype filters if the unfiltered view has at least one result with thetruefilter value. Otherwise, it returnsnil.The type of the filter.
Possible values boolean list price_range The current page URL with the URL parameter related to the filter removed.
- valuesarray of filter_value
The values of the filter.
The array can have values only for
booleanandlisttype filters.