Hello David,
I have the table views for products in my database.
Is it possible to show the most viewed products on top / first page of the merchant page?
Thanks Jan Roel
Hello Jan,
What about making view DESC the sort order for merchant search results? To do this, edit search.php and look for the following code at line 81:
$orderByDefault["rating"] = "rating DESC";
...and REPLACE with:
$orderByDefault["views"] = "views DESC"; $orderByDefault["rating"] = "rating DESC";
And then look for the following code at line 167:
$orderBySelection = $orderByDefault;
$orderBySelection = $orderByDefault; if (($parts[0]=="merchant") && ($sort=="relevance")) $sort = "views";
Hope this helps!
Cheers, David. -- PriceTapestry.com
©2006-2025 IAAI Software | Contact Us | Privacy Policy
Hello Jan,
What about making view DESC the sort order for merchant search results? To do this, edit search.php and look for the following code at line 81:
$orderByDefault["rating"] = "rating DESC";
...and REPLACE with:
$orderByDefault["views"] = "views DESC";
$orderByDefault["rating"] = "rating DESC";
And then look for the following code at line 167:
$orderBySelection = $orderByDefault;
...and REPLACE with:
$orderBySelection = $orderByDefault;
if (($parts[0]=="merchant") && ($sort=="relevance")) $sort = "views";
Hope this helps!
Cheers,
David.
--
PriceTapestry.com