Zen Cart Logo
Forums / Managing Customers and Orders / Customer Name Variables in Welcome Email

Customer Name Variables in Welcome Email

Locked

Views: 2,007

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
13 Jun 2008, 3:17 AM
#1
cowspot avatar

cowspot

New Zenner

Join Date:
Apr 2008
Posts:
54
Plugin Contributions:
0

Customer Name Variables in Welcome Email

Hello,

Just customizing my Welcome email. Read all the threads and found almost everything I needed. If %s is the variable to show the customer's last name, what is the variable to show the first name? Hopefully an easy answer!!

Thanks in advance! :huh:

13 Jun 2008, 5:56 AM
#2
fatguyinaz avatar

fatguyinaz

Zen Follower

Join Date:
Oct 2007
Location:
Safford, AZ
Posts:
313
Plugin Contributions:
0

Re: Customer Name Variables in Welcome Email

I looked in the /email/ directory and the code for the email_template_direct_email.html shows the following:

Dear $EMAIL_FIRST_NAME $EMAIL_LAST_NAME

Where did you get %s?

I did a search of all the files in version 1.3.8a with Dreamweaver and the %s shows up all over the place for all kinds of different stuff.

13 Jun 2008, 12:22 PM
#3
cowspot avatar

cowspot

New Zenner

Join Date:
Apr 2008
Posts:
54
Plugin Contributions:
0

Re: Customer Name Variables in Welcome Email

Hey,

It is in the \includes\languages\english\create_account.php

define('EMAIL_GREET_MR', 'Dear Mr. %s,' . "\n\n");
define('EMAIL_GREET_MS', 'Dear Ms. %s,' . "\n\n");

Thanks!

13 Jun 2008, 12:26 PM
#4
cowspot avatar

cowspot

New Zenner

Join Date:
Apr 2008
Posts:
54
Plugin Contributions:
0

Re: Customer Name Variables in Welcome Email

Sorry the code is:

define('EMAIL_GREET_MR', 'Dear Mr. %s,' . "\n\n");
define('EMAIL_GREET_MS', 'Dear Ms. %s,' . "\n\n");

Thanks!

11 May 2009, 5:39 PM
#5
webpdq avatar

webpdq

New Zenner

Join Date:
Apr 2009
Posts:
18
Plugin Contributions:
0

Re: Customer Name Variables in Welcome Email

I edit admin/email_welcome.php like this. I just commented out the Mr and Mrs stuff so it default to first name as if no gender was specified.

// build the message content

// if (ACCOUNT_GENDER == 'true') {
// if ($gender == 'm') {
// $email_text = sprintf(EMAIL_GREET_MR, $lastname);
// } else {
// $email_text = sprintf(EMAIL_GREET_MS, $lastname);
// }
// } else {
$email_text = sprintf(EMAIL_GREET_NONE, $firstname);
// }
$html_msg['EMAIL_GREETING'] = str_replace('\n','',$email_text);
$html_msg['EMAIL_FIRST_NAME'] = $firstname;
$html_msg['EMAIL_LAST_NAME'] = $lastname;