Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Oct 2008
    Posts
    12
    Plugin Contributions
    0

    Default Displaying User Email in Welcome Email

    I've done an hours worth of searching through the forums and several hours worth of meddling with my code in the language file create_account.php and the create_account.php in modules (both under my templates folder heirarchy as per the override system) and can't seem to get the user's email address to show up in their welcome email.
    I've added a definition to the create_account language file:
    PHP Code:
    define('CUSTOMER_EMAIL_ADDRESS'$email_address); 
    I then use this to try calling that constant within my body text:
    PHP Code:
    define('EMAIL_TEXT''<div class="content-heading">Membership Information </div>' "\n" ' <li><strong>Username:</strong>' CUSTOMER_EMAIL_ADDRESS  "\n" 
    In the create_account module file I added this around line 326
    PHP Code:
    $_SESSION['customers_email_address'] = $email_address
    Thinking it would pass the e-mail address variable on.
    Admittedly, I'm a beginner at PHP and am just getting my bearings.
    Anyone have any idea what I'm doing wrong and/or how I can get this to work?

    And yes, I realize that it is a bit redundant to include someone's email address in an email being sent TO that address, but seeing as it IS their user name and people often have different addresses (and most importantly, to pander to even the dumbest customers) I need to have this. Thanks.

  2. #2

    Default Re: Displaying User Email in Welcome Email

    I'm new to PHP as well and can't answer this, but I can offer an alternative.

    What if you edited the email language file for the welcome email to tell them that their user name/logon is the email address that they received their welcome email to?

    If you do that, you might also mention that for security purposes, you are unable to provide the password and remind them to keep it in a secure location, and perhaps tell them about the password reset function in case they forget it.
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,682
    Plugin Contributions
    11

    Default Re: Displaying User Email in Welcome Email

    Last time I looked, the login does not say username, but says Email Address. If yours says something different, you may have a strange template.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

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

    Default Re: Displaying User Email in Welcome Email

    I am also looking at the best way to do this. I'd like to add the customer's email address that they used to register included in the welcome email. I can achieve this using the $EMAIL_TO_ADDRESS in the html template to achieve this welcome email:



    The problem is that because I've used the html template file (email_template_welcome.html) to achieve this, it doesn't seem to flow through to the plain text email version.

    Is there a way that I can call the customer's email address so that it can be used in the create_account.php file in the same way that STORE_NAME and EMAIL_FROM can be used.

    Thanks for any and all suggestions :)

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

    Default Re: Displaying User Email in Welcome Email

    You would have to hard-code it in a custom copy of your /includes/modules/create_account.php file.
    .

    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

    Thanks for pointing me in the right direction DrByte :)

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

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

  9. #9
    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?

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

 

 
Page 1 of 2 12 LastLast

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