How to Change Product Sort Order in OpenCart?

Setting the Sort Order is important in that it allows you to control the order that the products will appear to your customers in the Storefront. 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

  1. Go to your OpenCart admin panel > Catalog > Products > Edit the product.
  2. Open the Data tab 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.

Filter By Price

  1. Using FTP or File Manager, navigate to the root folder of the OpenCart installation.
  2. Go to catalog/controller/product directory.
  3. Locate category.php file and open it in the editor
  4. 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 to preview changes.  If you face any problems or need our professional services, please email us at [email protected]

Join our Newsletter

Never miss the latest offers, voucher codes and useful articles delivered weekly in your inbox.