Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Mystery Search Button Text

Mystery Search Button Text

Views: 1,511

Results 1 to 19 of 19
17 Mar 2012, 2:25 PM
#1
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Mystery Search Button Text

Hi,

On this site we have the header search feature in operation, just below the logo on the right. We want to change the button text from "Go" to "Search". Easy, right? Just go to the proper defines file and change it.

But the proper defines file already says "Search". And so does any conceivable alternate define that I can find. So it has to be hard-coded in somewhere -- but where? I've tried the search in admin, looking for define('HEADER_SEARCH_BUTTON','Go'); and got nothing. Any idea where it's coming from?

ZC 1.3.9h
SexyPink template (Don't worry, it's not an adult site.)

From includes/languages/English/header.php
define('HEADER_SEARCH_BUTTON','Search');
define('HEADER_SEARCH_DEFAULT_TEXT', 'Enter search terms here');

From includes/languages/English/SexyPink/header.php
define('HEADER_SEARCH_BUTTON','Search');
define('HEADER_SEARCH_DEFAULT_TEXT', 'Enter search terms here');

Incidentally, that last location, the header.php file in the override folder, is actually working. If I leave the 'Tagline' define in, Tagline appears on the page overlapping the logo. When I set it back to just '', it disappears from the page. So the file is being recognized and used by ZC. But obviously the search defines are not being used. That's the real puzzle.

Rob

17 Mar 2012, 3:30 PM
#2
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Mystery Search Button Text

Have you checked the
templates/custom/sideboxes/tpl_search_header ?

SexyPink??
It's kinda brown!! ;)

17 Mar 2012, 3:38 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mystery Search Button Text

Try a search in the Tools ... Developers Tool Kit ... on the word:
'go'

Or search on:
Go

and select case sensative ... and see what comes up ...

17 Mar 2012, 4:08 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Mystery Search Button Text

I tried looking in templates/SexyPink/sideboxes/tpl_search_header but there isn't an override of that file there. So it's using the one in template_default, and the text is not defined there, nor is it hard-coded into that file.

Searched in DTK for "Go" and found lots of odds and ends, but no "Go" in anything governing the search box. Interestingly but irrelevantly it found "Go away gooberbrain :-P" in admin/includes/languages/english/password_forgotten.php!

Rob

17 Mar 2012, 4:14 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mystery Search Button Text

Go to the Developers Tool Kit ... and in the bottom input box enter:
Go

click the case sensative and select the Catalog ... then click Search ... what comes up?

17 Mar 2012, 4:18 PM
#6
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Mystery Search Button Text

Try searching for one of the following
cssButton
button_search
value="go"

17 Mar 2012, 7:44 PM
#7
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Mystery Search Button Text

Ajeh:

Go to the Developers Tool Kit ... and in the bottom input box enter:
Go
click the case sensative and select the Catalog ... then click Search ... what comes up?

Searched in DTK for "Go" and found lots of odds and ends, but no "Go" in anything governing the search box. Interestingly but irrelevantly it found "Go away gooberbrain :-P" in admin/includes/languages/english/password_forgotten.php!

Rob

PS
Whenever I say I searched for "Go" it means I searched for Go without the quotes

17 Mar 2012, 7:48 PM
#8
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Mystery Search Button Text

keneso:

Try searching for one of the following
cssButton
button_search
value="go"

cssButton: found some stuff in includes/functions/html_output.php but no "Go"

button_search: found a define in includes/languages/english/button_names.php but it said "Search"

value="go": nothing found

Rob

17 Mar 2012, 7:56 PM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Mystery Search Button Text

It's in includes/languages/english/YOUR_TEMPLATE/header.php.

17 Mar 2012, 8:09 PM
#10
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Mystery Search Button Text

stevesh:

It's in includes/languages/english/YOUR_TEMPLATE/header.php.

In a perfect world, yes, but :no:

But as I said up at the beginning of the thread, what's in there is...

define('HEADER_SEARCH_BUTTON','Search');
define('HEADER_SEARCH_DEFAULT_TEXT', 'Enter search terms here');

And as you can see, neither of those defines are having an effect on the site.

Rob

17 Mar 2012, 8:36 PM
#11
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Mystery Search Button Text

Well, I'm a Michigander, so I live in a perfect world.

All I can say is that when I edit includes/languages/english/MY_TEMPLATE_NAME/header.php and change:

// header Search Button/Box Search Button
define('HEADER_SEARCH_BUTTON','Search');
define('HEADER_SEARCH_DEFAULT_TEXT', 'Enter search keywords here');

to:

// header Search Button/Box Search Button
define('HEADER_SEARCH_BUTTON','Boola');
define('HEADER_SEARCH_DEFAULT_TEXT', 'Enter search keywords here');

I see the 'Boola' when I refresh the page.

17 Mar 2012, 8:41 PM
#12
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Mystery Search Button Text

Me too, usually. But as I also said up top, when I edit the Tagline, for example, in that file, the tagline edit appears. So we know the file is in use. But nevertheless, the setting for the search button text is being ignored/overridden by something else. That is the mystery to which the topic title refers.

Rob

PS
I'm pretty sure you're wrong about Michigan. Nova Scotia is where it's a perfect world. (The problem site is in the Land of Oz, otherwise it would be perfect.)

17 Mar 2012, 9:16 PM
#13
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Mystery Search Button Text

Nova Scotia ? Is that 'New Scotland', home of dinner comprised of 'haggis' (sheeps's stomachs stuffed with leaves) ?

17 Mar 2012, 9:23 PM
#14
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Mystery Search Button Text

No, the smart Scots came to Nova Scotia. They left their loonie cousins behind with the haggis.

Rob

17 Mar 2012, 9:47 PM
#15
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Mystery Search Button Text

Here's my source for that section:

<!--// bof: search //--> <div class="rightBoxContainer" id="search" style="width: 150px"> <h3 class="rightBoxHeading" id="searchHeading"><label>Search</label></h3> <div id="searchContent" class="sideBoxContent centeredContent"><form name="quick_find" action="http://www.stevesh.org/demo/index.php?main_page=advanced_search_result" method="get"><input type="hidden" name="main_page" value="advanced_search_result" /><input type="hidden" name="search_in_description" value="1" /><input type="hidden" name="zenid" value="d861ffb2d1a68f4e481873fb771c5377" /><input type="text" name="keyword" size="18" maxlength="100" style="width: 120px" /><br /><input class="cssButton button_search" onmouseover="this.className='cssButtonHover button_search button_searchHover'" onmouseout="this.className='cssButton button_search'" type="submit" value="Boola" style="width: 80px;" /><br /><a href="http://www.stevesh.org/demo/index.php?main_page=advanced_search&zenid=d861ffb2d1a68f4e481873fb771c5377">Advanced Search</a></form></div></div> <!--// eof: search //-->

'Boola' is what replaced 'Search' in header.php.

I have css buttons enabled (Yes) in Admin - Configuration - Layout Settings.

The same change happens in the Search sidebox.

17 Mar 2012, 11:09 PM
#16
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Mystery Search Button Text

Yeah, I know. If it was that easy I wouldn't have needed to ask the question. :lamo:

But I see two differences between your source and mine. Yours has a hidden field with a zenid in it; mine doesn't. And the text field of yours is the same as mine until after the width part, then mine has some javascript. Can that be a clue? Here's that part of my search form...

<input type="text" name="keyword" size="6" maxlength="30" style="width: 100px" value="" onfocus="if (this.value == '') this.value = '';" onblur="if (this.value == '') this.value = '';" />

There is no such difference though in the button part of the form. Our two forms are the same in that respect, except that mine says Go and yours says Boola.

Rob

18 Mar 2012, 1:11 PM
#17
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Mystery Search Button Text

I'd try hardcoding into
templates/custom/sideboxes/tpl_search_header.php
meaning i'd remove HEADER_SEARCH_BUTTON and put "search" to see what happens

18 Mar 2012, 2:17 PM
#18
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Mystery Search Button Text

Excellent! That worked. Of course I shouldn't have to do that; the defines file should work. But while it remains a mystery, it's a mystery I can stop worrying about now.

Thank you very much keneso.

Rob

18 Mar 2012, 6:30 PM
#19
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Mystery Search Button Text

Welcome.
Now you can keep looking for it, with ease of mind, and like always it'll pop up, and you'll say duh! why didn't I think about it!