<removed by request>
<removed by request>
Last message... the last two posts were unnecessary but I can't seem to edit or remove them.
'tpl_search_header' should not be edited at all. I apologize for the confusion.
Programming with a fever can get pretty wacky.
Sorry for dredging up a post this old, but using refriend's code at the top of this page, what should the button be called and where should it be put if it's being used as a search header button?
Hi,
The direct answer to your question is that by default the path to the image is (starting from the zen-cart root):
/includes/templates/template_default/buttons/english/button_search.gif
- or, if you are using the carts 'over-ride system' -
/includes/templates/YOU TEMPLATE NAME/buttons/english/button_search.gif
You may also change the name of the desired image (say if you would like to reuse another image) by changing the definition for BUTTON_IMAGE_SEARCH in:
/includes/languages/english/button_names.php
- or, if you are using the carts template 'over-ride system' -
/includes/languages/english/YOU TEMPLATE NAME/button_names.php
I would explain the 'override system' but it is a full length discussion covered elsewhere in this forum... but definitely worth your time to explore as it becomes VERY useful during cart upgrades!
I will add that I am not a fan of my earlier posted solution as I hacked a core function... it was just the best I could come up with.
Last edited by refriend; 25 Jul 2007 at 01:38 AM.
I don't think it is considered hacking into core function.
There is a flaw in the code. If you look up at the css buttons code you will see the code that should be for the submit image button. Just copy that part of the code down to into the last statement and the image appears.
BTW the image is in your template/buttons/english/button_search.gif just waiting for the code to be corrected.
Headsonic.com.au - Headphones and Microphones for Australians
Does not relate to you, It relates to the zen code. You have incorrectly coded your button location. You have
<input type="image" src="includes/templates/template_default/buttons/english/BUTTON_IMAGE_SEARCH_HEADER" alt="Search" title=" Search " />
The correct code for a search button is starting with
$content .= zen_draw_input_field
Then you may have to tweek the possition.Code:$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 = \'\';" onblur="if (this.value == \'\') this.value = \'' . HEADER_SEARCH_DEFAULT_TEXT . '\';"').zen_image_submit(BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON,'class="input" ');}
The button name is button_search.gif, the button is already in your button folder. I have custom buttons in my template folder. If your buttons are in your template folder that is the first place zen cart looks and if it can not be found there it will look in the template_default buttons english folder
For what it is worth. I think I found the true culprit. I submitted my finding and suggested correction to http://www.zen-cart.com/forum/showthread.php?p=414755
Hopefully this will address you issues. From what I can see this fix alone has completely solved the problem for me (so I believe you can disregard my earlier suggested fix).
... and please don't flog me if I am beating a dead horse..
Good luck!
Just bumping this thread as I am all kinds of confused.
The above method seems the easiest but it also seems that there are many other solutions mentioned in this thread. I'm 100% confused on how to simply add a different search button.
This shouldn't be so hard, should it? If anyone could possible sum-up what actually works I'd be much obliged. I've already spent way too much time trying to make this work. Thanks, all!
Bookmarks