Jump to content

Product Search.


Guest cgachris

Recommended Posts

Guest cgachris

I need to have the search narrowed down to the title. Now, I am getting 15 to 20 pages of results and the one I test it with can be on one of the last ones. No one including me is gonna go through all that. Any help would be appreciated.

Link to comment
Share on other sites

  • 8 months later...

Hi Mysty.

That is a bit of a pain in the butt. Isn't there something that the developers of CC can do to fix this? Surely not all products are 1 word only.

If anyone out there has a solution (other than the 1 word search) it will be much appreciated.

Cheers

aPoLLo :ninja2:

Link to comment
Share on other sites

Hey guys and gals.

I found this over at the .org forum and thought that it may be useful to a lot of people here. I am not sure if I am permitted to mention the moder's name so I won't. I have tried it and seems to be working just fine for me.

PLEASE DO NOT FORGET TO BACKUP ANY FILES BEFORE MAKING ANY CHANGES.

This quick hack will prevent the search function from searching through product descriptions - limiting the search to the product's title or code.

open: includes/content/viewCat.inc.php

Find:

CODE

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

Replace with:

CODE

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

Cheers

aPoLLo

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