- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
OpenCart 2.x. How to change products sort order
August 8, 2016
This tutorial shows how to update products sort order within a category in OpenCart 2.x.
By default products in OpenCart are displayed is ascending order, all the products sort order is set to 0.
You can change products order manually by setting each product order in the Catalog – Products tab of admin panel.
-
Select a product, open the Data tab, scroll it down and set the Sort order. Products with the highest number will be displayed in the end of the list.
-
Refresh the category listing page to see the changes.
-
You can also filter catalog by prices. Open the /system/modification/catalog/controller/product folder and edit the category.php file.
-
Find the p.sort_order value and change it to p.price:
if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.price'; }
-
Save changes in the file. Refresh category page with Ctrl+F5 to preview changes.
Feel free to check the detailed video tutorial below:
OpenCart 2.x. How to change products sort order