vjboc Posted September 15, 2009 Posted September 15, 2009 Is there a way to set up the search on my website to include product description without having to go to advanced search? Right now it will only pick up what is in the title of the product.
vjboc Posted September 15, 2009 Author Posted September 15, 2009 Hi Vinny Click Me regards Ken Ken . The codes look different compared to mine. here are my codes,,, <?php /* $Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- search //--> <tr> <td> <?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' => ' <table cellpadding="0" cellspacing="4" border="0"> <tr><td colspan="2" style="width:100%;vertical-align:middle;">'. tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="height:19px; width:100%;"') . '' . tep_hide_session_id() . '</td></tr> <tr><td class="bg_input ie6_png">' . tep_hide_session_id() . tep_image_submit('button_quick_find.png', BOX_HEADING_SEARCH,' style="float:right;vertical-align:middle;margin:0px 0px 0px 12px;"') . '' . BOX_SEARCH_TEXT . '</td></tr> <tr><td><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a></td></tr> </table> '); new infoBox($info_box_contents); ?> </td> </tr> <!-- search_eof //-->
Ken44 Posted September 15, 2009 Posted September 15, 2009 Hi Vinny You are using and older version that I am not familiar with. Do you have a checkbox in advanced search to search in description? If you do then adding tep_draw_hidden_field('search_in_description', '1') . tep_draw_hidden_field('inc_subcat', '1') May still work. I suggest you wait for someone with more knowledge of your osC version to reply Sorry I cannot be of more help. Regards Ken.
vjboc Posted September 15, 2009 Author Posted September 15, 2009 Ken no problem , I appreciate your time. Hopefully I can get this figured out.
Ken44 Posted September 15, 2009 Posted September 15, 2009 Hi Vinny I don’t have osC MS1 installed but it does have a search in description in the advanced search Try the code below, I have no way to test this but it should work. <?php /* $Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- search //--> <tr> <td> <?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' => ' <table cellpadding="0" cellspacing="4" border="0"> <tr><td colspan="2" style="width:100%;vertical-align:middle;">'. tep_draw_hidden_field('search_in_description','1') . tep_draw_hidden_field('inc_subcat', '1', 'CHECKED') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="height:19px; width:100%;"') . '' . tep_hide_session_id() . '</td></tr> <tr><td class="bg_input ie6_png">' . tep_hide_session_id() . tep_image_submit('button_quick_find.png', BOX_HEADING_SEARCH,' style="float:right;vertical-align:middle;margin:0px 0px 0px 12px;"') . '' . BOX_SEARCH_TEXT . '</td></tr> <tr><td><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a></td></tr> </table> '); new infoBox($info_box_contents); ?> </td> </tr> <!-- search_eof //--> Regards Ken
Recommended Posts
Archived
This topic is now archived and is closed to further replies.