Results 1 to 10 of 10
  1. #1
    Join Date
    May 2006
    Posts
    3
    Plugin Contributions
    0

    Default Search function not working properly

    I'm not a programmer by trade or by choice, but if I want my site live this week, I've got to work out these kinks myself. I've read the FAQ's in their entirety and searched the forum-both current and archived- in every way I could think of, and nothing seemed to match or address the problem I'm having.

    The Search function is misfiring in the following ways:

    1. It seems to be searching product descriptions only. I need it to search category names and product names also.

    2. It searches for a string and not a whole word. So when I put in 'red' as a search term, the results return items with the word 'colored' in the description.

    My categories are set up like so:
    Type:
    >Anklet
    >Bracelet
    etc....

    Color:
    >Blue
    >Red
    etc....
    I haven't mixed sub-categories and products in any category. None of my products are in the top. From what I've read here, it should autogenerate the keywords from the fields that I want, but it's not happening. Is this something that anyone can help with? Or is this beyond the scope of the forum?

    Thanks much in advance :)

    http://www.dragonsdreams.net/ (for reference)

    edited to add:
    I'm guessing I need to add the category ID and product name ID tables somewhere, but I'm at a loss as to where 'somewhere' is.
    Last edited by THISclose; 10 May 2006 at 06:06 PM. Reason: addtion

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Search function not working properly

    The logic driving the search results is in includes/modules/pages/advanced_search_result/header_php.php

    product names are searched
    category names are not searched
    partial word matches are done by default
    .

    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
    May 2006
    Posts
    26
    Plugin Contributions
    0

    Default Re: Search function not working properly

    So what specific changes should be made to includes/modules/pages/advanced_search_result/header_php.php so that category names and/or descriptions are included in the search?

    Fogie

  4. #4
    Join Date
    Mar 2006
    Posts
    27
    Plugin Contributions
    0

    Default Re: Search function not working properly

    I just ran into the same issue and edited includes\modules\pages\advanced_search_result\header_php.php as follows:

    Change line 206 from:
    Code:
                  " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status ";
    to
    Code:
                  " cd.categories_description, m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status ";
    then change line 219 from:
    Code:
                 USING(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c )
    to
    Code:
                 USING(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c )
    and line 249:
    Code:
                   AND p2c.categories_id = c.categories_id ";
    to
    Code:
                   AND p2c.categories_id = c.categories_id
                   AND c.categories_id = cd.categories_id ";
    and after what was line 297 (
    Code:
                                             OR p.products_model
    ) add the following lines:
    Code:
                                             LIKE '%:keywords%'
                                             OR cd.categories_name
    Works a treat!

    Hope this helps...

    Linda

  5. #5
    Join Date
    Feb 2007
    Posts
    24
    Plugin Contributions
    0

    customer issue Re: Search function not working properly

    I have done all those changes and still my search can NOt search the product info text, for example if I have a "red pen" in product info and search for "red" in the search, search result shows nothing!!
    WHat else should I do?

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

    Default Re: Search function not working properly

    Have you an URL that we can look at where this is happening?

    Is this a clean v1.3.7 or an upgrade?

    If an upgrade from what version and how did you do the upgrade?
    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: v1.5.5]
    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!

  7. #7
    Join Date
    Feb 2007
    Posts
    24
    Plugin Contributions
    0

    Default Re: Search function not working properly

    It is clean version 1.3.6
    www.iantiquerugs.com

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

    Default Re: Search function not working properly

    What happens if you switch to Classic template and try the search?
    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: v1.5.5]
    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!

  9. #9
    Join Date
    Feb 2007
    Posts
    24
    Plugin Contributions
    0

    Default Re: Search function not working properly

    Good idea, I did it and search works just fine.... so it is something wrong in my template, can I copy the classic search files to my template manualy or would you please tell me where and what should I look for?
    J.

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

    Default Re: Search function not working properly

    The search box files for the header are controlled by:
    /includes/modules/sideboxes/search_header.php
    /includes/templates/template_default/sideboxes/tpl_search_header.php

    Look like either they are out of date or you are using override files that are out of date:
    /includes/modules/sideboxes/your_template_dir/search_header.php
    /includes/templates/your_template_dir/sideboxes/tpl_search_header.php

    Check a clean Zen Cart for the version you are running and compare the files ...
    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: v1.5.5]
    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!

 

 

Similar Threads

  1. v139h The search on my store is not working properly
    By lolwaut in forum General Questions
    Replies: 18
    Last Post: 13 Jun 2015, 06:32 AM
  2. Search function not working properly (collation problem)
    By dennisysh in forum General Questions
    Replies: 9
    Last Post: 27 Apr 2010, 05:27 PM
  3. My search function does not work properly
    By idtags in forum General Questions
    Replies: 2
    Last Post: 1 Nov 2007, 05:40 PM
  4. Replies: 13
    Last Post: 31 May 2006, 08:02 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR