Guest Posted July 8, 2009 Share Posted July 8, 2009 when you go into advanced search options you can search the product descriptions, im wanting the little search box in the right hand collumn to search the descriptions automatically without having to tick a box. how do i do this? this is the code of the search box... ?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SEARCH); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $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 . '</b></a>'); new infoBox($info_box_contents); ?> and this is the code of the advanced search where you tick the box to include product description... <?php $info_box_contents = array(); $info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'style="width: 100%"')); $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION); new infoBox($info_box_contents); ?> thanks if anyone can help! Link to comment Share on other sites More sharing options...
spooks Posted July 8, 2009 Share Posted July 8, 2009 Simply change the line $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION); to $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1', true) . ' ' . TEXT_SEARCH_IN_DESCRIPTION); Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted July 8, 2009 Share Posted July 8, 2009 thanks for the reply but i need to somehow edit the TOP code which the current search box in the right collumn on my page, i dont know how to add the line you've given me into that? Link to comment Share on other sites More sharing options...
spooks Posted July 8, 2009 Share Posted July 8, 2009 Sorry, missed that, I though u just wanted the option in advanced search replace $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), with $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'search_in_description=1', 'NONSSL', false), 'get'), Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted July 8, 2009 Share Posted July 8, 2009 loving these fast replys sam, thanks! unfortunatly that did not work, here is my page with the search box on.. http://www.neildavison.co.uk/catalog/ if you type in L6 and then click search icon, it says no products found, if u then click back on the website not the browser, then tick the search in desciption box it work on there, but not from my search box. thanks for your help! Link to comment Share on other sites More sharing options...
spooks Posted July 8, 2009 Share Posted July 8, 2009 I suspect u have smthg else going on, should work, but an alternative for same is: replace: '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 . '</b></a>'); with: 'text' => tep_draw_hidden_field('search_in_description',1) . 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 . '</b></a>'); Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted July 8, 2009 Share Posted July 8, 2009 BRILLIANT that works great sam, thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.