Menu Close

Get Support From ShopWired Close

All systems fully operational

Subscribe To Updates
Prefer To Live Chat? Chat directly with ShopWired support Available from 9.00am to 6.00pm Monday to Friday Quickest response time
Send A Message
Response within 24 hours

Menu Close

Menu

Filter groups and filters

If the filter extension is enabled, the following objects and attributes are available:

filter groups

The filter group object has the following attributes:

filter_group.name

Returns the name of the filter group.


filter group

The filter object has the following attributes as part of the filter_group.filters array:

filter.product_count

Returns the number of products that have the filter applied.


filter_group.type

Returns 1 if the filter is a price filter and 0 if it is not a price filter.


filter.active

Returns true if the filter is currently selected.


filter.id

Returns the unique platform ID of the filter.


filter.name

Returns the name of the filter.


In the product object

product.filter_values

Returns an array of the filters and options applied to a product

{% for option, values in product.filter_values %}
    {% for value in values %} 
        {{ option }} - {{ value }}
    {% endfor %}
{% endfor %}

returns...

Colour ~ Red
Colour ~ Pink
Size ~ Small