How to create a chained filter in a filter list ?
Chained Filter is a method used to manage filters with dependencies. This feature utilizes Visibility Rules, making it useful for hiding filters that shouldn't be displayed until certain conditions are met.
For example, consider a filter list with items such as price, product type, tags, collection, and size. The size filter is highly specific and only applies to products with the bundle tag.
Follow these steps
- Select the Filter element on the right, then click the Settings tab and click the icon marked with a red arrow.
- Click the “View All” button to open a popup
- Scroll down to find the filter item you want to set a chained filter for, then click the icon indicated by the arrow.
- The Edit Filter Item form will appear. Scroll down to the Filter List section, select "Enable filter list visibility rules," and enable the checkbox
- The Visibility Rules section, highlighted with a red box, will appear
- A pop-up will appear—click Add Rule.
- A form will appear—fill it out based on your requirements.
- For example, we will trigger the filter tags with the value bundle using the OR logic
- Here’s how it appears on the storefront:
- The Size filter does not appear because the bundle tag has not been selected.
- The Size filter remains hidden until the bundle tag is selected