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. Click the create set button and give it a name.
  3. After creating the set, you will be able to choose the types of items that will be included in the filter.

Types of Items

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

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.

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 placeholder values).

  1. Click Add Custom Item to add a new element.
  2. Fill in 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.