Filters
Below are the variables to show filters that allow customers to filter products.
Note
Filter variables are available only if your installation supports filters.
for filters
The filters variable is used to display the list of filters through which customers can filter the products shown.
They can be used in the following pages: blog.html, blog-post.html, change-password.html,
contact-us.html, index.html, login.html, newsletter-subscription.html, remember-password.html, share.html, sign-up.html, sign-up-user.html, user-data.html, cart.html, department.html, new-releases.html, producer.html, promotions.html, search.html and on all generic pages.
| Instruction | Variable | Description |
|---|---|---|
| for | ancestors | Parent departments of the current department. Available only for the department filter |
| show | appliedValue | Name or icon of the currently applied value. Not present if the filter allows multiple values at the same time |
| show | apply | Button to apply the price filter. Present only for the price filter. |
| show | applyMode | Indicates whether multiple values or only one at a time can be applied. It can be "multi" or "single" |
| show | currency | Currency symbol. Available only for the price filter. |
| show | displayAs | Indicates whether each filter value is shown as name or icon. It can be "name" or "icon" |
| if | isApplied | Indicates whether it is applied, i.e. at least one filter value is applied |
| if | isByAttribute | Indicates whether the filter is by attribute |
| if | isByDepartment | Indicates whether the filter is by departments |
| if | isByPrice | Indicates whether the filter is by price |
| if | isByProducer | Indicates whether the filter is by producers |
| if | isExpandable | Indicates whether it is expandable, i.e. only some values are always shown and the others are shown by expanding all filter values |
| show | maxPrice | Maximum price among the filtered products. Available only for the price filter and only if displayed as a slider |
| show | minPrice | Minimum price among the filtered products. Available only for the price filter and only if displayed as a slider |
| show | onExpandCount | Number of filter values that are initially hidden and shown only when expanded. It is always zero if the filter is on price |
| show | priceFrom | Price from. Available only for the price filter |
| show | priceTo | Price to. Available only for the price filter |
| show | slider | Slider to select a price range. Available only for the price filter and only if displayed as a slider |
| show | title | Title |
| for | values | Values. For the department filter it is the list of departments, for the producer filter it is the list of producers, for attribute filters it is the list of attribute values, for the price filter it is the list of price ranges unless it is displayed as a slider |
for ancestors
| Instruction | Variable | Description |
|---|---|---|
| show | id | Ancestor department identifier |
| show | item | Ancestor department name |
for values
| Instruction | Variable | Description |
|---|---|---|
| show | id | Identifier. For the department filter it is the department identifier, for the producer filter it is the producer identifier, for the attribute filter it is the identifier of the attribute value |
| if | isApplicable | Indicates whether it is applicable. If you choose not to show non-applicable values for the filter, then all shown values will be applicable |
| if | isApplied | Indicates whether it is applied |
| show | item | Name or icon followed by the product count if applicable |
| show | onExpand | Indicates whether it is shown only when filter values are expanded. It can be "yes" or "no" |
for appliedFilters
The appliedFilters variable shows the currently applied filters with the ability to remove them. Clicking a filter removes the filter itself.
If you filter by keywords and new releases then these two will also be present in the applied filters.
| Instruction | Variable | Description |
|---|---|---|
| show | item | Name of the applied filter |
show appliedFiltersCount
The appliedFiltersCount variable shows the number of currently applied filters.
| Instruction | Variable | Description |
|---|---|---|
| show | appliedFiltersCount | Number of currently applied filters |
for breadcrumbs
The breadcrumbs variable shows the currently applied filters as breadcrumbs. Clicking a filter applies only that filter and its predecessors.
If you filter by keywords and new releases then these two will also be present as filters in the breadcrumb.
| Instruction | Variable | Description |
|---|---|---|
| if | isByAttribute | Indicates whether the filter is by attribute |
| if | isByDepartment | Indicates whether the filter is by departments |
| if | isByKeywords | Indicates whether the filter is by keywords |
| if | isByNewRelease | Indicates whether the filter is by new release products |
| if | isByPrice | Indicates whether the filter is by price |
| if | isByProducer | Indicates whether the filter is by producers |
| show | item | Name of the applied filter |
| show | position | Position starting at 1. Used for example for microdata |