Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Make search magnifying glass a button?


Recommended Posts

Could someone tell me how I can change this:


	<td valign="bottom" align="right" class="pageHeading"><form name="quick_find" method="get" action="<?php echo tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false);?>"> 

       <input style="margin-bottom: 3px;" type="text" name="keywords" size="10" maxlength="30" value="<?php echo htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["keywords"]));?>"><?php echo tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH);?></form></td>


so I can have an input button with text instead of the magnifying glass?

Link to comment
Share on other sites

This code outputs a normal HTML <input type="image"...> tag that displays an image for the submit button:


<?php echo tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH);?>


If you remove it from the above you will notice the image will no longer be shown and the only way to submit the form (to begin the search) would be to hit enter on the input text field.


You can replace the above with something like:


<input type="submit" value="Search">


per HTML rules and a normal submit button will be displayed.


You could further extend that to something like:


<input type="submit" value="<?php echo QUICK_FIND_BUTTON; ?>">


and have QUICK_FIND_BUTTON defined in the languages file, perferrably in includes/languages/<language>.php to have it globally set (as the quick find box is shown on basically every page).

:heart:, osCommerce

Link to comment
Share on other sites


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

  • Create New...