Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2003
    Location
    UK
    Posts
    105
    Plugin Contributions
    0

    Default 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/showth...=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.

  2. #2
    Join Date
    Nov 2003
    Location
    UK
    Posts
    105
    Plugin Contributions
    0

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

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

    Remove the space and it works fine.

  3. #3
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default 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).
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  4. #4
    Join Date
    Nov 2003
    Location
    UK
    Posts
    105
    Plugin Contributions
    0

    Default 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

  5. #5
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

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

    Hmm....that space shouldn't have been there to begin with. Glad you got it fixed.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  6. #6
    Join Date
    Nov 2003
    Location
    UK
    Posts
    105
    Plugin Contributions
    0

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

    I kind of guessed it was a typo!

 

 

Similar Threads

  1. v150 How can I change a default submit button in a sidebox to an image button?
    By JacobBushnell in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Aug 2016, 07:17 PM
  2. Search Sidebox Button
    By fymbscu in forum Basic Configuration
    Replies: 5
    Last Post: 1 Apr 2011, 08:04 PM
  3. search sidebox button
    By patg in forum Bug Reports
    Replies: 0
    Last Post: 11 Feb 2011, 06:36 AM
  4. Want to Change Search Button In Search Box
    By vishalon in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Feb 2010, 07:19 AM
  5. How to change the search Button?
    By touchclothing in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 29 Jul 2009, 04:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg