Hi David,
Quick question for you. If I'm implementing a change such as:
http://www.pricetapestry.com/node/442
How would I then change the default SORT behaviour to be something else other than ratings. Say, for example I wanted all of my search results to default to ascending prices or something?
Thanks! -Joe
Hi Joe,
The default sort order is set by the following code on line 8 of search.php...
$sort = (isset($_GET["sort"])?$_GET["sort"]:"relevance");
...so if you wanted, for example, price ascending, simply change this to:
$sort = (isset($_GET["sort"])?$_GET["sort"]:"priceAsc");
(where priceAsc is the key used in the $orderByDefault and $orderByFullText arrays)
Cheers,
David.