How to change products sort order in OpenCart

How to change products sort order

By default products in OpenCart are displayed is ascending order, all the products sort order is set to 0.

  1. You can change products order manually by setting each product order in the Catalog – Products tab of admin panel.
  2. 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.
  3. Refresh the category listing page to see the changes.
  4. You can also filter catalog by prices. Open the /system/modification/catalog/controller/product folder and edit the category.php file.
  5. 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';
  6. Save changes in the file. Refresh category page with Ctrl+F5 to preview changes.

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.