Search Button

Locked

Started by nick1973 on 17 Oct 2008, 11:31 AM · Views: 883

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
17 Oct 2008, 11:31 AM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Search Button

Hi Does anybody know how I can change the HTML search button to a graphic? See image attached with big arrow pointing to search button.

All my other buttons are graphics apart from this one.

Thanks

Nick

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

17 Oct 2008, 11:41 AM
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Search Button

Via
/includes/templates/nameofyourtemplate/sideboxes/tpl_search_header.php
SAMPLE Code below..ALTER path to your search image to suit..

<?php
/**
 * Side Box Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license [URL]http://www.zen-cart.com/license/2_0.txt[/URL] GNU Public License V2.0
 * @version $Id: tpl_search_header.php 2949 2006-02-03 01:09:07Z birdbrain $
 */
  $content = "";
  $content .= zen_draw_form('quick_find', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
  $content .= zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
  $content .= zen_draw_hidden_field('search_in_description', '1');
  if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
    $content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 100px" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';"') . ' ' . zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON);
  } else {
    $content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 100px" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';"') . ' <input type="image" src="includes/templates/nameofyourtemplate/images/search_arrow.gif" alt="Click" align="top" height="15" width="15" />';
  }
  $content .= "</form>";
?>

:smile:

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

17 Oct 2008, 11:42 AM
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Search Button

Thank you:smile:

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

17 Oct 2008, 11:44 AM
#4
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Search Button

Nick1973:

Thank you
Try code first then will accept thanks..
:laugh:

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

18 Oct 2008, 10:46 PM
#5
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

Re: Search Button

I tried the code and it did work! Thanks! :clap:

19 Oct 2008, 4:35 AM
#6
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Search Button

Pleased to hear code worked for you.
:smile:

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others