Post by Stergios » Tue Nov 17, 2015 5:37 pm

Hello, any ideas how to Change Default Product Sort Order to rating highest to categories,special and search on oc 2.0.1.1 ?

New member

Posts

Joined
Sat Apr 12, 2014 1:11 am

Post by opencartboost » Tue Nov 17, 2015 7:58 pm

For category page, try method below :
1. Open file category.php at catalog/controller/product/category.php
2. Find (line ~ 21):

Code: Select all

$sort = 'p.sort_order';
3. Replace with :

Code: Select all

$sort = 'rating';
4. Find (line ~ 27) :

Code: Select all

$order = 'ASC';
5. Replace with :

Code: Select all

$order = 'DESC';
Do method above for special and search
File search.php at catalog/controller/product/search.php
File special.php at catalog/controller/product/special.php

Active Member

Posts

Joined
Thu Jul 09, 2015 5:59 am

Post by Stergios » Tue Nov 17, 2015 8:33 pm

Thank you opencartboost works like a charm!

New member

Posts

Joined
Sat Apr 12, 2014 1:11 am

Post by nightwing » Wed May 27, 2020 8:59 am

Thanks opencartboos, this worked for me in version 3.0.3.2.
opencartboost wrote:
Tue Nov 17, 2015 7:58 pm
For category page, try method below :
1. Open file category.php at catalog/controller/product/category.php
2. Find (line ~ 21):

Code: Select all

$sort = 'p.sort_order';
3. Replace with :

Code: Select all

$sort = 'rating';
4. Find (line ~ 27) :

Code: Select all

$order = 'ASC';
5. Replace with :

Code: Select all

$order = 'DESC';
Do method above for special and search
File search.php at catalog/controller/product/search.php
File special.php at catalog/controller/product/special.php

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by nightwing » Mon Jun 01, 2020 6:03 am

Team,

I created a free ocmod for easy install - Tested on OCv3.0.3.2:
https://www.opencart.com/index.php?rout ... n_id=39324

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm

Who is online

Users browsing this forum: No registered users and 25 guests