Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default User greeting references duplicated

    Hi.

    I create a header.php in ../includes/languages/english/extra_definitions/MY_THEME/
    with:
    PHP Code:
    <?php
    define
    ('TEXT_GREETING_GUEST''Welcome <span class="greetUser">Guest!</span> Would you like to <a href="https://familynow.ca/index.php?main_page=login">log yourself in</a>?');
    define('TEXT_GREETING_PERSONAL''Welcome back <span class="greetUser">%s</span>! Would you like to see our <a href="%s">newest additions</a>?');
    ?>
    Now when I enable Customer Greeting in the admin I get the greeting twice on the main page. I can figure out where the could is pulling that in the middle one. I see it in the html but where is it grabbing it from?

    see here
    Last edited by familynow; 9 Nov 2011 at 03:47 AM.

  2. #2
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: User greeting references

    Anyone?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: User greeting references

    Quote Originally Posted by familynow View Post
    I create a header.php in ../includes/languages/english/extra_definitions/MY_THEME/
    That's the wrong folder for the customized file.

    If you're customizing a file found in /includes/languages/english/ then the correct place to put the CUSTOMIZED version of that file is in /includes/languages/english/YOUR_THEME/

    Anything you put in the extra_definitions folder will be loaded on ALL pages, which is probably why you're running into duplicates.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: User greeting references

    Thank you for correcting that. I was following this[1] in post #4.

    Unfortunately, it's still duplicating in the middle as before.

    ref.
    [1]
    ZC forum post

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: User greeting references

    Your custom template has added the code to insert that greeting on the top:
    Code:
    <!-- B0F GREETING-->
    		<div class="greeting">		Welcome <span class="greetUser">Guest!</span> Would you like to <a href="https://familynow.ca/index.php?main_page=login">log yourself in</a>?				</div>
    <!-- EoF GREETING-->
    And then the normal template is also displaying it where it normally does:
    Code:
    	<div class="centerColumn" id="indexDefault">
    
    
    <h2 class="greeting">Welcome <span class="greetUser">Guest!</span> Would you like to <a href="https://familynow.ca/index.php?main_page=login">log yourself in</a>?</h2>
    You can find these things yourself by right-clicking the page in your browser and choosing View Source. And then use the search to find the text you're looking for. In this case, searching for "welcome" shows both instances.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: User greeting references

    I had already found that too. How do I remove it though? I can't find which file it's in.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: User greeting references

    Try searching your site's files for text that matches what's showing up in the source, such as:

    class="greeting"

    ref:
    https://www.zen-cart.com/tutorials/index.php?article=38
    https://www.zen-cart.com/tutorials/index.php?article=39
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: User greeting references duplicated

    Brilliant! Not certain why I can't remember to use the tool kit first...Anyway. Thank you!

    The greeting was referenced here

    includes/templates/THEME/templates in tpl_index_default and tpl_index_categories in case anyone encounters this.

 

 

Similar Threads

  1. changing user greeting
    By Mrchristoh in forum General Questions
    Replies: 3
    Last Post: 23 Jun 2009, 11:07 PM
  2. Remove All References To Newsletter
    By aquestioner in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Dec 2007, 01:28 PM
  3. removing all references to 'manufacturer'
    By BouncerFL in forum General Questions
    Replies: 0
    Last Post: 18 May 2007, 01:39 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