Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2006
    Posts
    72
    Plugin Contributions
    0

    help question Search button to an image

    Hi there, I want to change the gray box (NOT the search header image) button that says search to an image. I do not want CSS buttons, but images only. It works everywhere else except for the search button. The button that you use to submit your search. Please help!

    http://www.cupcakecuddles.com

  2. #2
    Join Date
    Feb 2006
    Posts
    72
    Plugin Contributions
    0

    Default Re: Search button to an image

    Also there is a line showing up in IE under the shop and info sidebox and I cannot see where it's coming from... any ideas?

  3. #3
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    96
    Plugin Contributions
    0

    Default Re: Search button to an image

    Im after this too, if I figure it out I will let you know

  4. #4
    Join Date
    Feb 2008
    Posts
    55
    Plugin Contributions
    0

    Default Re: Search button to an image

    Has anyone figured this out?!
    Thanks

  5. #5
    Join Date
    Feb 2008
    Posts
    55
    Plugin Contributions
    0

  6. #6
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Search button to an image

    I searched high and low to another solution to editing this sidebox code like this, but I could not find another solution anywhere.. So reluctantly, I edited the sidebox. However, I did not like the idea of using a URL for the image location (as is suggested in the link Shokuf posted), and preferred to stick to using a relative link instead. Plus I wanted to maintain consistency by using the same location as other Zen buttons. Hope this is useful to others..

    If it helps.. here is the code I used to fix my search sidebox. Copy the tpl_search.php from the default_template to your own template folder as follows: includes/templates/YOUR_TEMPLATE/sideboxes/tpl_search.php. I used this in ZenCart version 1.3.8a, and it worked perfectly! Please see the highlighted section. Change "YOUR_TEMPLATE" to the name of your template folder.

    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_search.php 4142 2006-08-15 04:32:54Z drbyte $
     */
      $content = "";
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
      $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') . zen_hide_session_id();
    
      if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
        $content .= zen_draw_input_field('keyword', '', 'size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px"') . '<br />' . zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON);
        $content .= '<br /><a href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>';
      } else {
        $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 . '\';"') . '<br /><input type="image" src="includes/templates/YOUR_TEMPLATE/buttons/english/button_search.gif" value="" />';
        $content .= '<br /><a href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>';
      }
    
      $content .= "</form>";
      $content .= '</div>';
    ?>

 

 

Similar Threads

  1. v151 Changing the Search button image
    By ray-the-otter in forum General Questions
    Replies: 1
    Last Post: 6 Nov 2012, 07:38 PM
  2. custom search button image
    By keneso in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 21 Jan 2011, 02:28 AM
  3. Search Button image
    By mthem2003 in forum Templates, Stylesheets, Page Layout
    Replies: 31
    Last Post: 27 Aug 2009, 01:31 PM
  4. Changing Search Button to an image
    By MCanes in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Oct 2007, 04:44 AM

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