Jump to content

Product search not working properly


Guest

Recommended Posts

Guest malcolmord

Hello,

I have received several complaints from customers that the page search in CubeCart doesn't narrow a search down to keyword match.

my site http://www.themoviecorner.net try to search the butterfly effect for example i have part 1 and 2 but it does not show up it shows other results how to fix this?

I tried the search string butterfly and effect which works. I would like to know the answer to this one to. With my site, becasue of the number of products it would be better for to search the titles only.

cheers Mally

Link to comment
Share on other sites

Search searches for 1 word only - so if you search for "butterfly" instead of "butterfly effect" it comes up fine. Might put that next to your search box - search for 1 word of the title.

Link to comment
Share on other sites

@ dorien, gave a comment already at cubecart.org thread.

@ malcolm, if you want to search only titles, you can adjust that in viewCat.inc.php :)

Find this single line of code in includes/content/viewCat.inc.php:

(note: word-wrap in effect here, in your file this will be a single line)

			$like .= "(name LIKE '%".$searchArray[$i]."%' OR description LIKE '%".$searchArray[$i]."%' OR productCode LIKE '%".$searchArray[$i]."%') OR ";




Replace that code with this:




			$like .= "(name LIKE '%".$searchArray[$i]."%') OR ";

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...