Skip to main content

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.
  • Show in categories: defines on which category pages the criterion is offered in the Sort By dropdown.
    • All categories: the criterion is offered on every category page. This is the default value. Criteria created before this option appeared keep this value after the upgrade.
    • Selected categories: the criterion is offered only on the category pages selected in the Categories field.
  • Categories: appears when Show in categories is set to Selected categories. Select the category pages where the criterion is offered. At least one category is required. Subcategories are not included automatically — select every category you need.
note

Show in categories affects category pages only. Search results, product widgets, Page Builder product lists, search autocomplete and brand pages always offer every active criterion. The category's own Available Product Listing Sort By setting still applies on top of this option. See How to configure sorting criterion for details.

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

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.