Forums / General Questions / Limit the search default to only search titles and not description

Limit the search default to only search titles and not description

Started by amyleew on 20 Jan 2013, 9:43 PM · Views: 1,894

Results 1 to 7 of 7
20 Jan 2013, 9:43 PM
#1
amyleew avatar

amyleew

Zen Follower

Join Date:
Jul 2009
Posts:
159
Plugin Contributions:
0

Limit the search default to only search titles and not description

I am trying to add links to other products that people need in the descriptions of my listings but the problem I am facing is if they search on a product that has links elsewhere in other item descriptions, they also receive the search results for those other products as well and the real item they are searching for ends up in a mess of other products in with the thing they are trying to find.

Is there a way to limit the way the search defaults so that it only returns results that match in the item title not the description? I have seen that under the Advanced Search area you are able to untick 'search in product descriptions'. I would like that off for all standard searches and if they want to search in the description they can go to advanced and turn that on.

21 Jan 2013, 2:46 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limit the search default to only search titles and not description

There is a setting that you can use on the search to enable/disable the search in the description ...

For example, the tpl_search_header.php sidebox template file has the setting:

  $content .= zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();

If you change that to:

  $content .= zen_draw_hidden_field('search_in_description', '[B]0[/B]') . zen_hide_session_id();

it will not search the Product Description ...

NOTE: be sure to use your templates and overrides to make the change ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

22 Jan 2013, 11:06 PM
#3
amyleew avatar

amyleew

Zen Follower

Join Date:
Jul 2009
Posts:
159
Plugin Contributions:
0

Re: Limit the search default to only search titles and not description

I changed it to 0 in my current template and overwrote the file but it is still returning search results with the keywords in the description rather than only looking in the title.

23 Jan 2013, 12:17 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limit the search default to only search titles and not description

Is there perhaps a link to your site and some examples of what you are searching for that we could peek at? :lookaroun

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Jan 2013, 12:39 AM
#5
amyleew avatar

amyleew

Zen Follower

Join Date:
Jul 2009
Posts:
159
Plugin Contributions:
0

Re: Limit the search default to only search titles and not description

I just went to get the links and it is working now and only returning results from the title and not the description. I'm sorry, I thought I had done everything to clear the cache properly.

Thanks so much for your help.

23 Jan 2013, 12:42 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limit the search default to only search titles and not description

Not a problem ... computers are spookie ... :shocking:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

31 Dec 2013, 6:22 AM
#7
willy12 avatar

willy12

New Zenner

Join Date:
Nov 2010
Posts:
64
Plugin Contributions:
0

Re: Limit the search default to only search titles and not description

Hello everyone,

I'm having an issue with the search result on my site.
It's advanced search, even if I uncheck the "Search In Product Descriptions" it keeps searching in the description. The site is on Zen 1.3.9h

Any help appreciated.

Thanks