Results 1 to 3 of 3
  1. #1
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    help question Help needed for the "Tell-a-friend" HTML email template.

    Hello everyone,

    I'm trying to customise all system generated emails and I'm progressing in a satisfactory way. However, I'm stuck with the "Tell-a-friend" email and, having struggled for the last couple of days and not being able to find a solution in the forums or the Wiki, I hope somebody will be able to provide help:

    The text-only email sent by the system works as expected with some minor adjustments required as to line breaks etc but my issue is with the HTML template.

    The HTML template does NOT include the EMAIL_ADVISORY text as defined in the /includes/languages/english/my_template/email_extras.php file, which is properly shown in the text-only email:

    Code:
    ....
    // email advisory for all emails customer generate - tell-a-friend and GV send
      define('EMAIL_ADVISORY', '-----' . "\n" . '<strong>IMPORTANT:</strong> For your protection and to prevent malicious use, all emails sent via this web site are logged and the contents are recorded and available to the store owner. If you feel that you have received this email in error, please send an email to ' . STORE_OWNER_EMAIL_ADDRESS . "\n\n");
    ....
    To include this piece of information in the HTML email, I added it to the template as a separate <div class="advisory"> in the
    /email/email_template_tell_a_friend.html file, the full contents of which are as follows:

    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=$CHARSET" />
    <base href="$BASE_HREF" />
    
    <style type="text/css">
    body {background-color:#ffffff; color:#000000; font-family:Verdana, Arial, Helvetica, sans-serif;}
    a:link {color:#0066cc;}
    a:hover {background-color:#eeeecc; color:#0066cc;}
    a:visited {color:#0066cc;}
    .holder {background-color:#f9f9f9; border:1px solid #9a9a9a; border-bottom:0px; font-size:9px; text-align:left; width:550px;}
    .header {font-size:10px; padding:0px; width:550px;}
    .content {font-size:10px; padding:5px; width:550px;}
    .footer {font-size:9px; margin-top:5px; text-align:center; width:550px;}
    .extra-info {background-color:#cccc99; border:1px solid #9a9a9a; font-size:10px; margin-top:10px; padding:5px; width:550px;}
    .extra-info-bold {font-weight:bold;}
    .disclaimer {background-color:#f9f9f9; border:1px solid #9a9a9a; font-size:9px; padding:5px; width:552px;}
    .advisory {color:#666666; padding:5px;}
    .advisory a:link {color:#666666;}
    .advisory a:visited {color:#666666;}
    .disclaimer1 {color:#666666; padding:5px;}
    .disclaimer1 a:link {color:#666666;}
    .disclaimer1 a:visited {color:#666666;}
    .disclaimer2 {color:#666666; padding:5px;}
    .copyright {color:#666666;border-bottom:0px solid #9a9a9a;}
    .copyright a:link {color:#666666;}
    .copyright a:visited {color:#666666;}
    </style>
    </head>
    
    <body>
    
    <div class="holder">
    
      <!-- Header Section -->
      <div class="header">
      <img src="email/header.jpg" alt="Athens Collectibles" />
      </div>
    
      <!-- Content Section -->
      <div class="content">
        <div><strong>$EMAIL_TEXT_HEADER</strong></div><br />
        <div>$EMAIL_GREET<br /><br />$EMAIL_INTRO</div><br />
        <div>$EMAIL_MESSAGE_HTML</div><br />
        <div>$EMAIL_PRODUCT_LINK</div><br />
        <div>$EMAIL_TEXT_SIGNATURE</div>
        <div>$EMAIL_STORE_NAME</div>
      </div>
    
    </div>
    <div class="disclaimer">
      <div class="advisory">$EMAIL_ADVISORY</div>
      <div class="disclaimer1">$EMAIL_DISCLAIMER</div>
      <div class="disclaimer2">$EMAIL_SPAM_DISCLAIMER</div>
    </div>
    
      <!-- Footer Section -->
      <div class="footer">
        <div class="copyright">$EMAIL_FOOTER_COPYRIGHT</div>
      </div>
    
    $EXTRA_INFO
    </body>
    </html>
    You will notice some small differences from the standard template like the addition of <div>$EMAIL_TEXT_SIGNATURE</div> which again was not included and a rearrangement in the footer area. All these changes display successfully except for $EMAIL_ADVISORY shown in the email instead of its contents.

    I suspect that the solution should be something very simple but can't, for the life of me, guess what's wrong.

    Any help will be much appreciated. My thanks are expressed in advance.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Help needed for the "Tell-a-friend" HTML email template.

    Edit /includes/modules/pages/tell_a_friend/header_php.php, around line 106:
    Code:
        $email_body .= "\n\n" . EMAIL_ADVISORY . "\n\n";
        $html_msg['EMAIL_ADVISORY'] = EMAIL_ADVISORY;
    .

    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.

  3. #3
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: Help needed for the "Tell-a-friend" HTML email template.

    Many thanks DrByte, that worked although I could have never guessed it!

 

 

Similar Threads

  1. Removing the "Tell A Friend About Us Image" And Call for price text
    By Outlawlb in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 26 Jun 2009, 05:52 AM
  2. Replies: 7
    Last Post: 29 Oct 2008, 06:43 PM
  3. Replies: 0
    Last Post: 15 May 2008, 01:51 PM
  4. "write a review" and "tell a friend" on the same side
    By aagraphics in forum General Questions
    Replies: 4
    Last Post: 3 Feb 2007, 09:35 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR