In order for filters to be displayed in the store frontend for restricting search results, they must first be configured in Makaira. Filters can be temporarily disabled. Enabled filters are displayed by default for all search result sets where they can further narrow the set.

📘

By default, Makaira works with caching of filter values for 15 minutes. Changes can therefore take up to 15 minutes to be displayed by Makaira after import.


Creating filter

1920

The configuration of a filter is done by means of the following parameters:

FieldDecription
Title (1)Is used for identification within Makaira and overviews
Active (2)Determines if the filter is displayed
Use language specific title
(only for attributes)
(3)
the attribute name is used as a dynamic title - by default the title is fixed
Field (4)Defines the source of the filter
We differenciate between three types
  • Poduct attributes like color, size (all imported attributes are available)
  • Categories in which the product assigned
  • Skripted filter (see field: Script below)
Display (5)Choose the representation of the filter in the store frontend:
  • List
  • Multiselect
  • Range slider
  • Checkbox
  • Custom
ID (6)The value set here is used for assembling the forms in the frontend as well as representing selected values in the SEO URL in the format [id]_[Filterwert] and should be accordingly unique and meaningful
Position (7)Influences the order of the filters among themselves in the store frontend
Sorting (8)Sets the order of individual options within a filter
  • Frequency (option with the most results comes first)
  • Alphabetically ascending
  • Alphabetically descending
If no value is set the fallback is "Frequency"
Script (9)With a script, which is based on Elastic Painless, you can define a dynamic boolen filter based on product attributes. The filter has to be from the Field type Skript and Display Checkbox to work.
Examples would be
  • On Stock filter with the script (doc['OXSTOCK'].value + doc['OXVARSTOCK'].value) > 0
  • More than 50% discount filter with the script doc['OXTPRICE'].size()!=0 && (doc['OXTPRICE'].value > doc['OXPRICE'].value) && (( 100 / doc['OXTPRICE'].value ) * ( doc['OXTPRICE'].value - doc['OXPRICE'].value)) >= 50
Be aware that wrong scripts can lead to nonworking search requests!
Depends on (12)For complex use cases, where the expression of a filter influences the possible options of another filter (e.g. relationship manufacturer and model), the corresponding dependency can be specified here
* The Filter is only available when you booked the Makaira Search & Filter module.

Creating filter on product group fields

After you imported products groups data into Makaira(click here for more info about how to import groups data to Makaira)

You will be able to create filters based on product group fields, for ex: groups.<groupname>.price where <groupname> should be displayed as a placeholder for all possible groups.