Thanks for pointing me in the right direction DrByte :)
Thanks for pointing me in the right direction DrByte :)
DrByte, I've tried all sorts of variations of trying to code this in /includes/modules/create_account.php and am not having much luck.
I've been trying to use $email_address - is this correct?
What should the format be?
Thanks for your help.
You'll have to add $email_address to $email_text.
.
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.
I've added $email_address to this line:
$email_text .= "\n\n" . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_GV_CLOSURE . $email_address;
Do I also need to add an extra $html_msg statement?
$html_msg values are only used for HTML-formatted emails, which I thought you said were already working fine.
.
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.
I'd only worked around it for the HTML emails by putting the text inside the /email/email_template_welcome.html file together with the $EMAIL_TO_ADDRESS tag. But I would prefer to keep the contents of the email all together rather than the different sections of the email having to be updated in different files.
I hope I understand this now. The $email_text is the sections and the order that they appear in the text email. and the $html_msg is the sections and the order that they appear for the html message. And both are built from the /includes/modules/create_account.php file.
In the e-start book it hasBut this doesn't seem quite right as the contents of the two types of emails can be quite different. For example adding my change to the html template (Your login is: $EMAIL_TO_ADDRESS.) doesn't mean that this also appears in the plain text email.So how do you get plain-text emails since only HTML email layout templates are available? Well, the answer is Zen Cart retains all the values from template tags and just strips away all HTML and CSS codes from an email layout template before sending out the relevant plain-text emails.
And so, I have been trying to put this information in at the source of the email build (rather than the email template) but have still been unable to do this. I have been concentrating on getting the HTML email correct first but I will go back and check the text version re $email_address.
I can't believe how long I've spent on one email but this welcome email is the first chance you have of making an impression.
Thanks for all your help.
K
Correct approach for HTML emails.
Not possible in this version of Zen Cart. (see comment below about a future version)
Almost correct. Clarification: The $html_msg builds the keys that are output in the html message inside the $EMAIL_SOMETHING placeholders, regardless what order they appear in the email template .html files.
Correct. They are edited separately. You do have easier control over html emails.
That is the best strategy.You do need to treat them separately, since the text-only content is built and used separately from the html content.
In Zen Cart v2.0 the whole email infrastructure has been redone to make all of this way easier. No more language file edits for email messages. All emails are done via email templates. Still separate versions for HTML and TEXT content, but all use clear english with the $EMAIL_SOMETHING$ placeholders ... in both HTML and TEXT messages, making all the edits a lot more straightforward. So, there's something to look forward to down the road when it's released.
In the meantime, you simply need to add the $email_address into the $email_text variable before the email is sent. (In the desired order/placement, of course, since the text message is built in a specific order.)
.
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.