How to configure sorting criterion
This guide describes how to create and configure sorting criterion.
To create a sorting criterion navigate to System -> Sorting criteria -> Add new.
You can find a dropdown with widely used predefined templates near this button.
1. Set general information
Type the Name into the appropriate field, set this criterion as Active to be shown on the frontend after being saved. Define, whether this criterion will be Default (applied automatically when opening a category page) and whether it will be Default for search results page. Also, you can set the Position of this criterion in the dropdown.
2. Set sorting conditions
Choose the entity by which the product collection will be sorted; it can either be an Attribute or a Ranking Factor. Select the desired attribute or ranking factor from the dropdown. If a ranking factor is chosen, adjust the Weight parameter. Next, define the sorting order—results can be in ascending (ASC) or descending (DESC) order.
If necessary, add a new Sub-condition, but it must match the entity type of the first condition.
Additionally, if you want to fine-tune your sorting criteria, you can Add new condition to include extra sorting conditions.
3. Implement changes
Save the criterion and clear Magento's cache to make it visible on the frontend. Then, if it is required, execute a reindex to display the correct order of results.
Already created sorting criteria are added to the list, where you can edit or delete them.