Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    May 2008
    Posts
    250
    Plugin Contributions
    1

    Default Re: Displaying User Email in Welcome Email

    Thanks for pointing me in the right direction DrByte :)

  2. #2
    Join Date
    May 2008
    Posts
    250
    Plugin Contributions
    1

    Default Re: Displaying User Email in Welcome Email

    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.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Displaying User Email in Welcome Email

    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.

  4. #4
    Join Date
    May 2008
    Posts
    250
    Plugin Contributions
    1

    Default Re: Displaying User Email in Welcome Email

    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?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Displaying User Email in Welcome Email

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

  6. #6
    Join Date
    May 2008
    Posts
    250
    Plugin Contributions
    1

    Default Re: Displaying User Email in Welcome Email

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

    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

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Displaying User Email in Welcome Email

    Quote Originally Posted by kdays View Post
    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.
    Correct approach for HTML emails.
    Quote Originally Posted by kdays View Post
    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.
    Not possible in this version of Zen Cart. (see comment below about a future version)
    Quote Originally Posted by kdays View Post
    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.
    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.

    Quote Originally Posted by kdays View Post
    ... 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.
    Correct. They are edited separately. You do have easier control over html emails.

    Quote Originally Posted by kdays View Post
    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.
    That is the best strategy.
    Quote Originally Posted by kdays View Post
    I have been concentrating on getting the HTML email correct first but I will go back and check the text version re $email_address.
    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.

 

 

Similar Threads

  1. v151 Preview welcome email and order confirmation email
    By tips007 in forum General Questions
    Replies: 1
    Last Post: 18 Jan 2013, 10:52 PM
  2. Welcome email not sending to user
    By cmavroudis in forum General Questions
    Replies: 2
    Last Post: 16 May 2010, 08:46 AM
  3. Replies: 2
    Last Post: 21 Feb 2010, 04:33 AM
  4. welcome email problem and order confirmation email problems
    By oneelios in forum General Questions
    Replies: 1
    Last Post: 22 Jan 2010, 11:18 AM
  5. Displaying user's email address on confirm page
    By dsided in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Sep 2008, 11:07 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