Dspooner Posted November 11, 2013 Share Posted November 11, 2013 Hi on our cube cart site the current search box looks at title, descritption and product code. but this is causing us problems as it is bring up lots of results that are not relevant. is it possible to make cube cart only look at product title, SKU ??? thanks daniel Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 12, 2013 Share Posted November 12, 2013 Hi Daniel, Yes you can do this by editing the searchCatalogue function of the classes/catalogue.class.php file. Please note that CubeCart tries a fulltext search first which will order results by relevancy. If that fails it falls back to the old style "like" search which is "dumb". If your search query is less characters in length than the minimum allowed length set by your hosting company fulltext search will fail. Change line 1208 from $rlike = " AND (I.name RLIKE '".$regexp."' OR I.description RLIKE '".$regexp."' OR I.product_code RLIKE '".$regexp."')"; To: $rlike = " AND (I.name RLIKE '".$regexp."' OR I.product_code RLIKE '".$regexp."')"; You may need to also remove the fulltext index from the description column of the CubeCart_inventory MySQL table. 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.