gbg112 Posted August 5, 2006 Posted August 5, 2006 I am wondering if it is possible (I am almost sure it is) to enhance the search function. At the moment the search function will only find words that are listed in the product title. I am interested to find out if I can make it find words in the description as well. Also is it possible to suggest possible matches if there are no matches (ex: yellwo -- suggestion = yellow). Thanks in advance.
bill110 Posted August 5, 2006 Posted August 5, 2006 I am wondering if it is possible (I am almost sure it is) to enhance the search function. At the moment the search function will only find words that are listed in the product title. I am interested to find out if I can make it find words in the description as well. Also is it possible to suggest possible matches if there are no matches (ex: yellwo -- suggestion = yellow). Thanks in advance. In the advanced search there is a check box to search in product description. The other question you have is beyond my capabilities. My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
gbg112 Posted August 5, 2006 Author Posted August 5, 2006 In the advanced search there is a check box to search in product description. The other question you have is beyond my capabilities. Is there any way to have this the norm for searches made on the site? So that way the user does not have to click advanced search and then click search in product description. Thanks
bill110 Posted August 5, 2006 Posted August 5, 2006 Is there any way to have this the norm for searches made on the site? So that way the user does not have to click advanced search and then click search in product description. Thanks Just figured this out. go to catalog/advanced_search.php about line 164 change it to this: $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1', true) . ' ' . TEXT_SEARCH_IN_DESCRIPTION); I added true after the '1' and it default selects the search in description check box. since the quick search is based on the advanced search this should work. My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
boxtel Posted August 5, 2006 Posted August 5, 2006 Just figured this out.go to catalog/advanced_search.php about line 164 change it to this: $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1', true) . ' ' . TEXT_SEARCH_IN_DESCRIPTION); I added true after the '1' and it default selects the search in description check box. since the quick search is based on the advanced search this should work. you can also add this: tep_draw_hidden_field('search_in_description',1) . to the box search.php so that searches from that box are also performed on the descriptions by default. so this: ' ' . tep_hide_session_id() . becomes: ' ' . tep_hide_session_id() . tep_draw_hidden_field('search_in_description',1) . Treasurer MFC
gbg112 Posted August 5, 2006 Author Posted August 5, 2006 you can also add this: tep_draw_hidden_field('search_in_description',1) . to the box search.php so that searches from that box are also performed on the descriptions by default. so this: ' ' . tep_hide_session_id() . becomes: ' ' . tep_hide_session_id() . tep_draw_hidden_field('search_in_description',1) . Thanks a lot. Does anyone know about the second half of the question? Is it possible to suggest something if nothing comes up on the search. (ex yellwo --> yellow is suggested. Thanks again
boxtel Posted August 5, 2006 Posted August 5, 2006 Thanks a lot. Does anyone know about the second half of the question? Is it possible to suggest something if nothing comes up on the search. (ex yellwo --> yellow is suggested. Thanks again well, there is a contribution which records all searches and lets you set alternatives for misspelled search words like you search for boook and it will come up with nothing so search will say : did you mean book? where book is then the link to search on book. things like that. it is called enhanced search or something similar. Treasurer MFC
Recommended Posts
Archived
This topic is now archived and is closed to further replies.