Guest dazza100 Posted July 7, 2008 Share Posted July 7, 2008 HI I have over 1500 products, currently if a customer’s searches for - False nails. 26 pages of result are shown and the first page does not contain any false nails. The first page will show products with just one of the searched words. There has to be a way to make this more relevant. Can anyone help? Thanks Daz Quote Link to comment Share on other sites More sharing options...
Guest jazzydan58 Posted August 5, 2008 Share Posted August 5, 2008 I have the same problem, the search seems to pick up nearly everything on the site which makes it pointless how can I restrict it? Quote Link to comment Share on other sites More sharing options...
Guest asafisk Posted August 6, 2008 Share Posted August 6, 2008 Hi, I think the following code is to blame: file: includes/content/viewCat.inc.php; line: around 182; if (!empty($_REQUEST['searchStr'])) { if (empty($orderSort)) { $orderSort = ' ORDER BY SearchScore DESC'; } Back up the file first, then change the code above to this: if (!empty($_REQUEST['searchStr'])) { if (empty($_REQUEST['sort_order'])) { $orderSort = ' ORDER BY SearchScore DESC'; } What's happening is the page is checking to see if a sort order ($orderSort) has already been defined. If not, then it uses the SearchScore in Descending order. Except $orderSort is always defined so we check for a $_REQUEST parameter instead. Now when you run a search and the sort order is not already defined you will see results by relevance. ...I hope Good luck. Quote Link to comment Share on other sites More sharing options...
Guest jazzydan58 Posted August 8, 2008 Share Posted August 8, 2008 Thanks for that asafix, I will give it a try on my new store :rolleyes: Quote Link to comment Share on other sites More sharing options...
eriknv Posted September 27, 2008 Share Posted September 27, 2008 it works :homestar: Quote Link to comment Share on other sites More sharing options...
Guest Posted October 5, 2008 Share Posted October 5, 2008 hi, i tried your little peace of code and it works a treet thanks a lot :) Quote Link to comment Share on other sites More sharing options...
eriknv Posted October 31, 2008 Share Posted October 31, 2008 Hi, I think the following code is to blame: file: includes/content/viewCat.inc.php; line: around 182; Error Message: 1054: Unknown column 'SearchScore' in 'order clause' SQL: SELECT DISTINCT(I.productId), I.* FROM CubeCart_inventory AS I, CubeCart_category AS C WHERE (I.name LIKE '%aramis900%' OR I.description LIKE '%aramis900%' OR I.productCode LIKE '%aramis900%') AND C.cat_id > 0 AND C.cat_id = I.cat_id AND C.hide = '0' AND (C.cat_desc != '##HIDDEN##' OR C.cat_desc IS NULL) AND I.disabled = '0' ORDER BY SearchScore DESC Can somebody help me to fix this ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.