Zen Cart Logo
Forums / Managing Customers and Orders / Help needed for the "Tell-a-friend" HTML email template.

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

Locked

Views: 2,736

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
4 Nov 2010, 7:33 PM
#1
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

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:

....
// 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:

<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.

4 Nov 2010, 7:57 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

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

4 Nov 2010, 9:08 PM
#3
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

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

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