Sorting criteria
This section describes settings used for configuring sorting criteria.
You can find it in the System -> Sorting Criteria -> Add new/Edit.
General information
- Name: defines the name of the sorting criterion.
- Active: enables the sorting criterion.
- Default: applies this sorting criterion by default on catalog pages.
- Default for search: applies this sorting criterion by default on the search results page instead of sorting by
Relevance
. - Position: sets the position of the sorting criterion in the dropdown on the frontend.
- Add new condition button: adds a condition to the current sorting criterion, where:
- Attribute: shows dropdown selector with the attributes to sort by. An attribute must have value Yes in the Used in sorting configuration in its properties to be available for sorting.
- Ranking factor: shows dropdown selector with all ranking factors.
- Expand button: appears when Ranking factor is selected. Opens Weight configuration, which sets the number of points for ranking factor.
- ASC: sets results direction from the lowest to the highest (A->Z, 0->9).
- DESC: sets results direction from the highest to the lowest (Z->A, 9->0).
- Add new sub condition button: opens menu for setting a sub condition for the current condition.
When using a sub condition, results will be calculated in the following way:
Product Score = SubConditionWeight1 + SubConditionWeight2 + SubConditionWeightN
The extension will calculate and assign each item its own score, then place them in ascending or descending order. For example, products are sorted by creation date and stock availability:
- Product E (28.10.2020, in stock)
- Product C (25.10.2020, in stock)
- Product A (20.10.2020, in stock)
- Product D (25.10.2020, out of stock)
- Product F (20.10.2020, out of stock)
- Product B (18.10.2020, out of stock)
With adding a new condition, results will be calculated in the following way:
Product Score = Condition1(SubConditionWeight1 + SubConditionWeight2 + SubConditionWeightN) + Condition2(SubConditionWeight1 + SubConditionWeight2 + SubConditionWeightN)
It will sequentially sort the products, first by the primary condition and then by the subsequent conditions within the group. As an example, products are sorted by creation date and then by stock availability for the specified date:
- Product E (28.10.2020, in stock)
- Product C (25.10.2020, in stock)
- Product D (25.10.2020, out of stock)
- Product A (20.10.2020, in stock)
- Product F (20.10.2020, out of stock)
- Product B (18.10.2020, out of stock)
Advanced configuration
- Code: defines a code that used in the request part of URL —
?product_list_order=codename
.