This article will explore the different options for changing the default sort orders of items in their categories, including:
- Setting the general default ‘sort by’ option
- Setting the default 'sort by' option for specific categories
You may be looking at categories on your site and want to change the order that items appear in. Your site most likely will include options that allow customers to sort them as they choose, as shown below:
The default 'sort by' option that is selected by default when the customer first visits the page can be changed in the backend
Setting the general 'sort by': step-by-step guide
1. Log into your Magento Admin Panel
2. Navigate to Stores > Settings > Configuration.
3. Select Catalog → catalog along the left hand side.
4. Expand the "Storefront" block and change the "Product Listing Sort by" to price
These are the default config settings that the site will fall back on if nothing is defined for each category. You can also set a specific value for individual categories.
Setting the 'sort by' for specific categories: step-by-step guide
1. Log into your Magento admin panel.
2. Navigate to Catalog > Categories
3. Select the category you wish to edit from the navigation tree on the left hand side, and click on the Display tab.
The Default Product Listing Sort By option is where this is set. By default, the Use Config Settings option should be selected. If this is set, it will use the general sort by option defined above. However, if you de-select the checkbox, you can change the value to apply to that specific category.
4. Change this value as desired, and the change will be reflected on the frontend of the site.