ariens Posted October 31, 2005 Posted October 31, 2005 Currently, my quick find box doesn't query against the product description. I've investigated adding this but all my attempts have failed... I've tried appending a get parameter to the quick_find form, however it gets overwritten somewhere in the process... I've attempted adding a hidden field to the form, but for the life of me I can't seem to reverse engineer the constructor for the class that generates the form... Without changing the logic in advanced_search_results.php to always check against the description, I can't seem to get this working... Can someone please lend a hand?
Guest Posted October 31, 2005 Posted October 31, 2005 Dave, there's a nice little Contribution called Search Box Anywhere that has some great bits of code. i used it to add the form to my header and then I dropped the Infobox for it completely. The search is Advanced, too, not just product names. Very clean and simple!
xinirnix Posted May 2, 2006 Posted May 2, 2006 I did it by adding following piece of code : . tep_draw_hidden_field('search_in_description','1') to this part of the code in search.php in /catalog/includes/boxes/ $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'); giving this as result: $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_hidden_field('search_in_description','1'), 'align' => 'center', 'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'); It seems to work, but don't shoot me because I am a complete php-dump. Xinirnix
Recommended Posts
Archived
This topic is now archived and is closed to further replies.