zirh Posted April 25, 2004 Posted April 25, 2004 i want to put the searh box in the header like this site http://www.e-network.fr/catalog/default.php i now the code is in the searh box i am novice thanks for your help
masat Posted April 25, 2004 Posted April 25, 2004 Well as a non-programmer here is a method I tried real quick. BACK UP YOUR HEADER FILE FIRST go to: catalog/includes/boxes/search.php copy everything from <tr> to </tr> and then open: catalog/includes/header.php and paste that code into the header file at the location you want. I would comment out the line that has: tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT and paste in the code leaving off the <tr> tags. You will be replacing the graphics on the right side of the header with your search box. You will need to comment out a couple lines to finish up and then maybe do a little monkeying around to get exactly what you want but that will definately put a search box in your header. <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' => 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>'); new infoBox($info_box_contents); ?> </td> </tr> That's about the best I can do on short notice. I often spend days on small stuff like this. Maybe someone else may have a better way. Tim How do you know when you know what you want to do for the rest of your life?
zirh Posted April 25, 2004 Author Posted April 25, 2004 When i paste the code in the header file, i have a rectangle around the search engine. (comes from the stylesheet.css). if i modify the stylesheet to move this rectangle all my box will be modify. i want to delete this rectangle and keep original design of all my boxes. thanks
masat Posted April 25, 2004 Posted April 25, 2004 You need to comment out the info_box stuff Try this: <td align="center"> <?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . 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>';?> </td> I've got to get some sleep. Good Luck, Tim How do you know when you know what you want to do for the rest of your life?
241 Posted April 25, 2004 Posted April 25, 2004 or this <?php $hide = tep_hide_session_id(); echo '<form name="quick_find" method="get" action="' . tep_href_link (FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false) . '">'; echo $hide . '<input type="text" name="keywords" onFocus=this.value="" size="20" maxlength="30" value="' . BOX_SEARCH_TEXT . '"> ' . '<input type="submit" value="Go"><br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . tep_draw_hidden_field('search_in_description', '1') . '</a>'; echo '</form>'; ?> No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
zirh Posted April 25, 2004 Author Posted April 25, 2004 Thanks for your help now its working i want to do the same things with the manufacturers box. is it possible ?
masat Posted April 25, 2004 Posted April 25, 2004 Everthing is possible. All it takes is time, research and application. You should be able to follow the basic procedure as with the search box. Tim How do you know when you know what you want to do for the rest of your life?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.