Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2012
    Posts
    12
    Plugin Contributions
    0

    Default Box_heading_search1

    in my search box instead of saying "search here"

    it says "BOX_HEADING_SEARCH1"

    How can i change this??


  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Box_heading_search1

    BOX_HEADING_SEARCH1 doesn't exist in a stock Zencart installation, so it must be something your custom template has added. Check the files from the template to see if there's supposed to be a file in includes/languages/english/extra_definitions/YOUR_TEMPLATE.

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Box_heading_search1

    Quote Originally Posted by tomcoleman View Post
    in my search box instead of saying "search here"

    it says "BOX_HEADING_SEARCH1"

    How can i change this??
    I think someone has already tried changing it, or you have some other add-on.
    "BOX_HEADING_SEARCH1" is *not* one of the 'standard defines'.

    The closest I can find is in
    /includes/languages/english.php

    Line #94 : define('BOX_HEADING_SEARCH', 'Search');

    (I used the developers toolkit to find this. It is a useful tool to know about).

    For an *instant* fix, make a copy of Line#94 (as above) but make the copy read

    define('BOX_HEADING_SEARCH1', 'Search');

    For a *proper* fix, you'll need to identify which of your PHP files contains 'BOX_HEADING_SEARCH1' and edit it to remove the "1" (IOW, make it match the define that it should be).

    Also see response from stevesh.

    Cheers
    Rod

  4. #4
    Join Date
    Apr 2012
    Posts
    12
    Plugin Contributions
    0

    Default Re: Box_heading_search1

    Quote Originally Posted by stevesh View Post
    BOX_HEADING_SEARCH1 doesn't exist in a stock Zencart installation, so it must be something your custom template has added. Check the files from the template to see if there's supposed to be a file in includes/languages/english/extra_definitions/YOUR_TEMPLATE.
    nothing in there

    but if i go to /public_html/includes/templates/theme568/common/

    and edit tpl_header.php

    I can see the code for BOX_SEARCH

    Code:
    <div class="search">
    					<!-- ========== SEARCH ========== -->
    					<?php echo zen_draw_form('quick_find_header', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');?>
    					<?php 
    						echo zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
    						echo zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();
    					?>
    					<?php echo zen_draw_input_field('keyword', '' . BOX_HEADING_SEARCH1 . '', 'class="input1" onblur="if(this.value==\'\') this.value=\'' . BOX_HEADING_SEARCH1 . '\'" onfocus="if(this.value ==\'' . BOX_HEADING_SEARCH1 . '\' ) this.value=\'\'"');?>
    					<?php echo zen_image_submit ('search.gif', HEADER_SEARCH_BUTTON, 'class="input2" ');?>
    					</form>
    				<!-- ============================ -->
    				</div>

    if i edit
    Code:
    <?php echo zen_draw_input_field('keyword', '' . BOX_HEADING_SEARCH1 . '',
    it changes whats displayed in the search box, but dont know if this is correct or effecting anything.

  5. #5
    Join Date
    Apr 2012
    Posts
    12
    Plugin Contributions
    0

    Default Re: Box_heading_search1

    Quote Originally Posted by RodG View Post
    I think someone has already tried changing it, or you have some other add-on.
    "BOX_HEADING_SEARCH1" is *not* one of the 'standard defines'.

    The closest I can find is in
    /includes/languages/english.php

    Line #94 : define('BOX_HEADING_SEARCH', 'Search');

    (I used the developers toolkit to find this. It is a useful tool to know about).

    For an *instant* fix, make a copy of Line#94 (as above) but make the copy read

    define('BOX_HEADING_SEARCH1', 'Search');

    For a *proper* fix, you'll need to identify which of your PHP files contains 'BOX_HEADING_SEARCH1' and edit it to remove the "1" (IOW, make it match the define that it should be).

    Also see response from stevesh.

    Cheers
    Rod
    Rod just done your fix

    changed to

    Code:
    // quick_find box text in sideboxes/quick_find.php
      define('BOX_HEADING_SEARCH1', 'Search');
      define('BOX_SEARCH_ADVANCED_SEARCH', 'Advanced Search');
    it now shows "search" in the search box

    THANK YOU SO MUCH!!!!!!


    Do you know how to change the "search" text to say "click here to search" ?

  6. #6
    Join Date
    Apr 2012
    Posts
    12
    Plugin Contributions
    0

    Default Re: Box_heading_search1

    its ok i edited

    define('BOX_HEADING_SEARCH1', 'Click here to Search our Catalog');

    thanks!!!

  7. #7
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Box_heading_search1

    Quote Originally Posted by tomcoleman View Post
    Rod just done your fix
    I wish to reiterate that this is a *quick fix*. The intention being to make your site appear as though it wasn't broken until such a time you find the actual cause or correct fix.

    From your follow up response to stevesh it appears that here is closer to directing you to the *correct* solution than I (actually I knew he was already), but my aim was to get you out of trouble with minimum fuss.

    If the penny hasn't dropped yet, the problem occurs when a 'defined constant' is called upon, but the constant itself is unavailable. There are many reasons why a constant may be unavailable, ranging from files being uploaded to the wrong places, files being badly edited, incorrect file permissions, and so forth.

    What my 'quick fix' did was to create a brand new define to mimic the one that is missing/bad from your own installation. I also had you place it into a file that I knew was both available and readable by your system (otherwise you'd have a lot more to complain about than this 'simple' error).

    The downside of this quick fix is that we have no way of knowing where or what file contained the original/correct define, nor do we know what else may be missing from this exact same file. This is why it is rather imperative that you continue to seek the *cause* of the problem, rather than relying on my quick fix. Without identifying the correct file/cause and fixing it your system should be considered as 'unstable'.

    In VERY simple terms, the line I had you add to the english.php file *should* be already located in one of the files relating to your template file, but we can't really help identify this for you. It is something you need to do on your own.

    stevesh suggested it may be located in
    /includes/languages/english/extra_definitions/YOUR_TEMPLATE, which is more than a reasonable assumption/educated guess,
    but as should be evident from my 'quick fix', in practice this could be defined in any number of places.

    Cheers
    Rod

  8. #8
    Join Date
    Sep 2012
    Posts
    15
    Plugin Contributions
    0

    Default Re: Box_heading_search1

    This was a great help but I have found the issue and I would like to give back to the community (for a change).

    I found this thread because my new template from Template Monster had the same text in the search window and so this is how I got to the thread. I was all set to do what the first few suggestions were but thank you, Rod G, for following up with finding the root cause. I went further.

    Using the above search method (via Tools>Developer's Tool Kit) I seached for BOX_HEADING_SEARCH1 under "look up in all files, PHP only and it came up in my template's "includes/templates/CUSTOM/common/tpl_header.php" file.

    Then I did the same thing with BOX_HEADING_SEARCH. (NOTE, without the "1'"). This yielded five results when searching via "look up in all files".

    It appears to me that my template's "tpl_header.php" file has a typo in it since no other .php files reference it. The typo is the addition of the "1" In fact elsewhere on the same page it references it without the 1, so I am certain the template designer made a typo.

    I simply removed the 1 from the .php that was provided by my template and all was well.

    So I don't know if this is the case for one particular premium provider's templates, but the search in developer's toolkit that I outline above will find the root cause.

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Box_heading_search1

    I suspect the TM template designer had in mind to use a distinct "search" text for that search box, so other search boxes could have different default text (as you say there were other search boxes in this tpl_header file). This would have required creating a define for this version of the constant, which either didn't happen or was lost in some file mixup.

 

 

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