Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2005
    Location
    UK
    Posts
    24
    Plugin Contributions
    0

    Default Don't show documents in search results

    Hi there,

    I would like to remove documents from the search results so that only products show in the results.

    Has anyone attempted this?

    I think I would have to make changes to:
    includes/modules/pages/advanced_search_results/header_php.php

    but I can't figure it out. Any help would me much appreciated.

    Thanks,
    Matt

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Don't show documents in search results

    We do not have any switches built in at this time to remove various Product Types from the search ...

    You could customize the search select statements to exclude that product type ...
    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!

  3. #3
    Join Date
    Jan 2005
    Location
    UK
    Posts
    24
    Plugin Contributions
    0

    Default Re: Don't show documents in search results

    Thanks for the reply Linda.

    Am I looking in the right file?
    includes/modules/pages/advanced_search_results/header_php.php

    Any other clues?

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Don't show documents in search results

    Yes for the search you need to customize the WHERE statement to exclude a product type ...

    Be careful in how that is written it can be confusing at first ...
    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!

  5. #5
    Join Date
    Jan 2005
    Location
    UK
    Posts
    24
    Plugin Contributions
    0

    Default Re: Don't show documents in search results

    I've got it working. Thanks Linda.

    I changed this code:
    Code:
    $where_str = " WHERE (p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id ";
    to:
    Code:
    $where_str = " WHERE (p.products_status = 1
                   AND p.products_type != 3
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id ";
    This now excludes documents from the search results.
    My store does not have product subcategories.
    You might have to add extra code if yours does.

 

 

Similar Threads

  1. Show custom product fields in search results?
    By DigitalShadow in forum General Questions
    Replies: 2
    Last Post: 24 Jul 2011, 01:06 AM
  2. Search Results show code
    By UnSub in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 21 Jan 2011, 08:53 PM
  3. Show Parent Category in Search Results
    By flymmt in forum General Questions
    Replies: 0
    Last Post: 28 Sep 2010, 07:58 PM
  4. Replies: 8
    Last Post: 5 Dec 2006, 10:52 PM

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