Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

add search function from the search box on the top of the page


Recommended Posts

Hi everyone. I want to add the search feature from the search box on the top of my page in the header.php file. I've copied and pasted the code of search.php from the boxes folder. It's no good because I get the background color settings from the other boxes in the site.


Here's the code from the search.php file in the boxes folder. I removed the heading and text as I didn't need them:

 $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="30" maxlength="30" style="width: ' . (BOX_WIDTH-700) . 'px"') . '	' . tep_hide_session_id() . tep_image_submit('buton_cauta.jpg', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>[' . BOX_SEARCH_ADVANCED_SEARCH . ']</b></a>');
 new infoBox($info_box_contents);

I want to be able to change the background color to this element without changing the bg color of the rest of the boxes, and I also want to be able to change the placement the elements (input field, search button and advanced text link).


How can I get the individual components of the search box like: the form tag, the input tag, the submit button tag and the advanced search link?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...