Zen Cart Logo
Forums / General Questions / Where are the $EMAIL_GREETING type things defined?

Where are the $EMAIL_GREETING type things defined?

Views: 1,178

Results 1 to 4 of 4
12 Sep 2011, 1:12 AM
#1
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

Where are the $EMAIL_GREETING type things defined?

I did read the tutorial, I have used the DTK, I have looked in the language files AND in the email folder and I still can't find where these $EMAIL_GREETING type things are defined. Could someone just give a clear answer to that question? Please? The tutorial does not tell where they are or if it does, it isn't explained in a way that I can understand it.

Thank you so much for any help. Every time a client asks for help with this, I struggle to get it done.

12 Sep 2011, 1:31 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Where are the $EMAIL_GREETING type things defined?

$EMAIL_GREETING is built from whatever you've put in your language file for the greeting text, ie: "Dear ", followed by Mr or Ms depending on gender, followed by the customer's surname. If gender hasn't been selected or is disabled in your store, then the customer's firstname and lastname are used directly.

You haven't explained why you're asking, nor what you want to change it to.
If you don't like using $EMAIL_GREETING as it's built, you can simply edit your /email/ template files and replace $EMAIL_GREETING with $EMAIL_FIRSTNAME $EMAIL_LASTNAME or whatever exact text you want to put into the template.

There's an FAQ article which explains all that: https://www.zen-cart.com/tutorials/index.php?article=113

12 Sep 2011, 1:45 AM
#3
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

Re: Where are the $EMAIL_GREETING type things defined?

I actually have a client who wants to change only parts of the e-mail that is being sent. Not the greeting, so much, but things in the body itself. This is what he wants his e-mail to say:

*We wish to welcome to Ardent Partners’ Research Library.

You are now a registered member of our library and have account privileges including:

Research Newsletter which provides regular updates on market trends as well as access and discounts to Ardent’s supply management research.

Order History to view the details of orders you have completed with us.

Permanent Cart so that any research products added to your online cart remain there until you remove them, or check them out.

For help with any of our online services, please email us at [email protected] *

You said:
$EMAIL_GREETING is built from whatever you've put in your language file for the greeting text, ie: "Dear ", followed by Mr or Ms depending on gender, followed by the customer's surname.

Where did I put this exactly? In the english.php file? Because I searched it for "greeting" and found nothing. I was hoping to find the other things like $EMAIL_MESSAGE_HTML, but I can't find them anywhere.

I replaced this:

$EMAIL_MESSAGE_HTML

with "test"

and uploaded it back to the email folder and nothing changed. If that doesn't do it, I don't understand how I can change it. I see this in the article:

$EMAIL_MESSAGE_HTML (the actual welcome message: defined by the "EMAIL_TEXT" constant)

but it doesn't tell me how or where the "EMAIL_TEXT" constant is defined in anything I can find.

I did look at the article, I always try to find answers before I ask, as evidenced by my bringing up this old post from last year.

I'm sorry, this is just one of the most difficult things in my experience that we do with ZenCart and I have built lots of them. Every time a client asks to change the e-mail, I cringe because it's so difficult to figure out.

12 Sep 2011, 2:07 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Where are the $EMAIL_GREETING type things defined?

In ZC v1.x.x the email content is built from the text in your language files. And the text-only emails come directly from there. The HTML emails are built by assembling all those strings into separate variables with placeholders (outlined in the FAQ article I mentioned) that are in the html-email-templates, and get replaced with the generated text at runtime.

So, simply use the Developers Toolkit to lookup the text that's PRESENTLY showing in your emails ... pick a short phrase like "permanent cart", and that'll show you what constant you need to redefine to your specific needs for the bulk of the text you posted.

I can't see any reason why you'd need to touch $EMAIL_GREETING based on what you described.

As per the FAQ article and as you'll see in several of the shorter email templates that don't have as many replaceable variables, $EMAIL_MESSAGE_HTML is simply stuffed with the entire email message that is put into the template when the email is sent. There's no need to be fussing with that one.

You've been talking about $EMAIL_XXXXXX things, which suggests you're intentionally trying to edit HTML-formatted emails specifically. If you're NOT using HTML emails, then you don't need to edit the email template files at all. Instead you'll just edit the language files to change the text that's currently being sent in the emails to whatever you want it to say. That's where DTK comes in handy.