Introduction
The Filters module lets you create filter sets: named collections that combine data from different modules into one managed list.
A filter is a ready-made set of options that you build once in the admin panel and reuse in your client application: in dropdowns, catalog filter panels, selectors, and anywhere else a user picks a value from a predefined list.
The point of the module is that you don't have to duplicate data by hand. You add links to existing entities (products, pages, discounts, and so on) to a filter set and, if needed, add your own custom values.
Creating a filter set
To create a filter set:
- Open the Filters module in the left menu.
- Below the list of sets, fill in the two fields of the Create Filter form:
- Name: the name of the filter set.
- Marker: a unique identifier that your application code uses to retrieve the set.
- Click Add. The set appears in the list.
- Open the set with the edit button. You can now choose the element types to include in the filter.
Element types
After creating a set, choose which types of data the filter uses. Each type is a data table built from records that already exist in the corresponding modules:
- Pages: project pages.
- Products: catalog products.
- Admins: system administrators.
- Attribute: attributes from attribute sets.
- Discounts: discounts.
- Personal Discounts: personal (individual) discounts.
- Bonuses: bonuses.
- Payment Methods: payment methods.
When you select a type, you get a table with the current records of that module, where you check the items to include in the filter set. This way, the filter always relies on real data in the system.
Items in the type tables are links to existing records in other modules. If the source record (for example, a product or a discount) changes, the filter set shows its current data.
Configure Filter: custom items
Besides data from other modules, you can add your own custom values to a filter set. This helps when no module has the item you need, for example options like "All", "No category", or other service values.
The Configure Filter view opens a table with the set's selected data. Here you don't select new records; you configure how the items you've already selected are ordered and grouped in the final filter.
To turn on the view, check the Configure Filter checkbox above the list of items. The choice is remembered: if you turn on the view in one set, it stays on when you open other filter sets in the same browser.
In the Configure Filter table, you can:
-
Drag and drop: drag rows to change their order. This sets the order in which items are shown to the user.
-
Build nesting: drag one row onto another to create nested elements (a hierarchy). This lets you group filters by level, for example a parent category with values nested under it.
-
Move selected items: a second way to build nesting, useful for several rows at once:
- Click Select items. Checkboxes appear next to the rows. Check the items you need; Select All checks every item, and the Selected counter shows how many are selected.
- Click Attach to parent.
- In the Choose parent for transfer window, click the item that will become the parent, or select To root (top level) to move the items to the top level, and confirm with Move. The selected items move together with their nested items.
Cancel exits selection mode without moving anything.
Adding custom items
You can add your own custom values right in this table. This helps when no module has the item you need (for example, options like "All", "No category", or service values).
- Click Add Custom Item.
- Fill in two fields:
- Title: the item's display name (what the user sees).
- Value: the item's value (what is passed as the selected option).
Custom items are added alongside the selected data and support drag-and-drop and nesting the same way. They are stored in the filter set and don't depend on other modules.