filter
A storefront filter.
To learn about supporting filters in your theme, refer to Support storefront filtering.
Properties | Type | Description |
---|---|---|
active_values | array of filter_value | The values of the filter that are currently active. |
inactive_values | array of filter_value | The values of the filter that are currently inactive. The array can have values only for the list type filters. |
label | string | The customer-facing label for the filter. |
max_value | filter_value | The highest filter value. Returns a value only for price_range type filters. Returns nil for other types. |
min_value | filter_value | The lowest filter value. Returns a value only for price_range type filters. Returns nil for other types. |
param_name | string | The URL parameter for the filter. For example, filter.v.option.color . |
range_max | number | The highest product price within the collection results. Returns a value only for price_range type filters. Returns nil for other types. |
range_min | number | The lowest product price within the collection results. Returns a value only for price_range type filters. Returns nil for other types. |
type | string | The type of filter. Possible values: list , price_range |
url_to_remove | string | The current page URL with the URL parameter related to the filter is removed. |
values | array of filter_value | The values of the filter. The array can have values only for the list type filters. |
{
"label": "availability",
"param_name": "filter.v.availability",
"type": "list",
"range_min": 0,
"range_max": 0,
"values": [
{
"param_name": "filter.v.availability",
"label": "1",
"value": "1",
"active": false,
"count": 137
},
{
"param_name": "filter.v.availability",
"label": "0",
"value": "0",
"active": false,
"count": 4
}
],
"active_values": null,
"inactive_values": [
{
"param_name": "filter.v.availability",
"label": "1",
"value": "1",
"active": false,
"count": 137
},
{
"param_name": "filter.v.availability",
"label": "0",
"value": "0",
"active": false,
"count": 4
}
],
"max_value": null,
"min_value": null,
"url_to_remove": "/collections/all-collections?="
}
Updated over 1 year ago