Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Limit quick-Search To Product Headers

    I am trying to limit the search function to the products title when the customer use the search is the header. The reason I want that done is that I have set up the products so the Car Makes are listed in the Title so now when a customer search for a Car make and that car make is listed in some product description the result will include 100's of results that are irrelevant to what the search was for.

    Is there a simple way to do that.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Limit Search To Product Headers

    In your tpl_search_header.php file you'll see a that it draws a field for search_in_description, whose value is set to 1 by default. Change that to 0 and it will not search descriptions unless the customer goes to the advanced search and chooses the description option.

    Code:
      $content .= zen_draw_hidden_field('search_in_description', '0') . zen_hide_session_id();
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: Limit quick-Search To Product Headers

    Thank You. That did the trick.

 

 

Similar Threads

  1. v139h Limit the search default to only search titles and not description
    By amyleew in forum General Questions
    Replies: 6
    Last Post: 31 Dec 2013, 07:22 AM
  2. v139h Search / limit by attribute
    By TroyC in forum General Questions
    Replies: 1
    Last Post: 16 Apr 2013, 01:58 AM
  3. search box / headers
    By slater555 in forum General Questions
    Replies: 5
    Last Post: 29 Apr 2011, 04:08 AM
  4. Limit Search Results To Model Number and Product Title
    By CoolCarPartsOnline in forum General Questions
    Replies: 6
    Last Post: 7 Jul 2010, 10:59 AM
  5. Getting Two Search Headers - How To Fix?
    By scottdev in forum General Questions
    Replies: 13
    Last Post: 3 Aug 2009, 11:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg