Skip to main content

Introduction

The Filters module allows you to create filter sets — named collections that combine data from different modules of the system into a single managed list.

A filter is essentially a ready-made set of options that you compile once in the admin panel and then reuse in the client application: for building dropdowns, filtering panels in the catalog, selectors, and any other places where a user needs to select a value from a pre-prepared list.

The key idea of the module is that you do not need to manually duplicate data. In the filter set, you add links to already existing entities (products, pages, discounts, etc.), and if necessary, you can supplement them with your own arbitrary values.

Creating a Filter Set​

To create a new filter set:

  1. Open the Filters module in the left menu.
  2. Below the list of sets, there is a Create Filter form. Fill in the two fields:
    • Name — the name of the filter set;
    • Marker — a unique identifier by which the set can be accessed in the application code.
  3. Click Add — the set will appear in the list.
  4. Open the set using the edit button: you will be able to choose the types of elements that will be included in the filter.

Types of Elements​

After creating the set, you choose which types of data will participate in the filter. Each type is a data table formed from records that have already been created in the corresponding modules of the system:

  • 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.

By selecting a type, you get a table with the current records of that module and mark the elements that should be included in the filter set. Thus, the filter always relies on real data from the system.

info

The elements in the type tables are links to existing records from other modules. If the original record (for example, a product or discount) is changed, the filter set will display its current data.

Configure Filter — Custom Elements​

In addition to data from other modules, you can add your own arbitrary values to the filter set. This is convenient when the desired element is not available in any module — for example, options like "All", "No category", or any service values.

When switching to the Configure Filter view, a table with the selected data of the set opens. In this view, you do not select new records, but configure how the already selected elements will be arranged and grouped in the final filter.

This view is activated by checking the Configure Filter checkbox above the list of elements. The selection is remembered: if you enable the view in one set, it will remain enabled when opening other filter sets in this browser.

In the Configure Filter table, the following actions are available:

  • Drag-and-drop — rows can be dragged to change their order. This allows you to set the sequence in which elements will be displayed to the user.

  • Building hierarchy — by dragging one row inside another, you can create nested elements (hierarchy). This allows you to group filters by levels — for example, a parent category and its nested values.

  • Moving selected elements — a second way to build hierarchy, convenient for multiple rows at once:

    1. Click Select items — checkboxes will appear next to the rows. Mark the desired elements; the Select All button marks all, and the Selected counter shows how many are selected.
    2. Click Attach to parent.
    3. In the Choose parent for transfer window, click on the element that will become the parent, or select To root (top level) to move elements to the top level, and confirm by clicking Move. The selected elements are moved along with their nested ones.

    The Cancel button exits the selection mode without moving.

Adding Custom Elements​

You can add your own arbitrary values directly in this table — this is convenient when the desired element is not available in any module (for example, options like "All", "No category", or service values).

  1. Click Add Custom Item to add a new element.
  2. Fill in the two fields:
    • Title — the displayed name of the element (what the user will see).
    • Value — the value of the element (what will be passed as the selected option).

Custom elements are added to the already selected data and also participate in drag-and-drop and hierarchy building. They are stored within the filter set and do not depend on other modules.