Jump to content

change Search Peramiters


Dspooner

Recommended Posts

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

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...