Sort by Product Rating as default
Hi David,
Was wondering if it's possible to have 'category pages' and 'search queries' sorted by "product rating" as default, rather than "Relevance".
Thanks,
NEil
Yes, works perrfectly and looks great! Thanks again David.
Neil
Hi David,
Just noticed that when I'm using search external the results are still sorted by relevance. Is there any way to have this apply to search external results too.
ALso, with search external results, is there any way to control how much of the TITLE displays. For example, have a maximum of 30 characters of the TITLE displayed. I'd like to do this as some pages where I'm using search external look too busy when I have products with long titles.
Thanks,
Neil
Hi Neil,
If you could email me your latest searchExternal.php and html/searchresults.php i'll make both changes for you. Regarding product names; if you like I'll code it so that it breaks on a space and not mid-word after x characters (e.g. 25)...
Cheers,
David.
--
Developer, Price Tapestry
General PHP, MySQL and Affiliate Marketing tech help for Price Tapestry customers at davidmorison.com
Hi Neil,
Sure - at the top of search.php look for the following code:
$sort = (isset($_GET["sort"])?$_GET["sort"]:"relevance");...and REPLACE with:
$parts = explode(":",$q);if (($parts[0]=="merchant") || ($parts[0]=="brand"))
{
$sortDefault = "relevance";
}
else
{
$sortDefault = "rating";
}
$sort = (isset($_GET["sort"])?$_GET["sort"]:$sortDefault);
Cheers,
David.
--
Developer, Price Tapestry
General PHP, MySQL and Affiliate Marketing tech help for Price Tapestry customers at davidmorison.com