Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to change 'Search Button' in sidebox?

How to change 'Search Button' in sidebox?

Locked

Views: 1,956

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
21 Jun 2007, 11:52 AM
#1
billybonds avatar

billybonds

Zen Follower

Join Date:
Nov 2003
Location:
UK
Posts:
102
Plugin Contributions:
0

How to change 'Search Button' in sidebox?

Hi,
I'm trying to use my own image for the search button in the sidebox.

How do you do this? From http://www.zen-cart.com/forum/showthread.php?t=68179&highlight=search+button I understand that you must have to modify tpl_search.php.

However, when I use the code given...

$content .= zen_draw_input_field('keyword', '', 'size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == '' . HEADER_SEARCH_DEFAULT_TEXT . '') this.value = '';" onblur="if (this.value == '') this.value = '' . HEADER_SEARCH_DEFAULT_TEXT . '';"') . zen_image_submit(BUTTON_IMAGE_SEARCH,HEADER_SEARCH _BUTTON,'class="input" hspace="0" vspace="0" style="margin-left:5px"');

I get the following error...

Parse error: parse error, unexpected T_STRING in /homepages/4/d205728592/htdocs/the_african_touch/e-shop/includes/templates/template_default/sideboxes/tpl_search.php on line 21

I've tried googling but no luck so far. Any ideas?

Thanks.

21 Jun 2007, 1:10 PM
#2
billybonds avatar

billybonds

Zen Follower

Join Date:
Nov 2003
Location:
UK
Posts:
102
Plugin Contributions:
0

Re: How to change 'Search Button' in sidebox?

It's ok - ...HEADER_SEARCH _BUTTON...

Remove the space and it works fine.

21 Jun 2007, 1:17 PM
#3
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: How to change 'Search Button' in sidebox?

No. You don't need to modify ANY files, other than your image file. Just go to:
includes/templates/template_default/buttons/English/button_search.gif, and replace the button_search.gif with your own image.
Look at it this way......if the php is already calling for "button_search.gif", why would you need to change the code for it to STILL look for it? You just need to change the image (named the same).

21 Jun 2007, 1:55 PM
#4
billybonds avatar

billybonds

Zen Follower

Join Date:
Nov 2003
Location:
UK
Posts:
102
Plugin Contributions:
0

Re: How to change 'Search Button' in sidebox?

Hi Get Em Fast

That's what I have done.

However the original search button still remained. Only with the above (space removed) did it call the new image.

I may well be wrong but I think the original button was drawn on the fly and the change in code calls includes/templates/template_default/buttons/English/button_search.gif

Thanks,

jim

21 Jun 2007, 1:57 PM
#5
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: How to change 'Search Button' in sidebox?

Hmm....that space shouldn't have been there to begin with. Glad you got it fixed.

21 Jun 2007, 2:00 PM
#6
billybonds avatar

billybonds

Zen Follower

Join Date:
Nov 2003
Location:
UK
Posts:
102
Plugin Contributions:
0

Re: How to change 'Search Button' in sidebox?

I kind of guessed it was a typo!