Post by BOBKIM7080 » Sat Jan 23, 2016 1:33 am

using 1.5.6
when i sort price at products list, it sort by regular price which works for display only.
is anybody know how to change it to sort by "special price"?

User avatar
New member

Posts

Joined
Fri Aug 26, 2011 12:53 am


Post by Qphoria » Sat Jan 23, 2016 4:49 am

I know it is done in 2.1 by special

in the catalog/model/catalog/product.php file

Code: Select all

elseif ($data['sort'] == 'p.price') {
				$sql .= " ORDER BY (CASE WHEN special IS NOT NULL THEN special WHEN discount IS NOT NULL THEN discount ELSE p.price END)";
You might be able to use that but it might take a bit more that I haven't looked into.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 10 guests