Zen Cart Logo
Forums / General Questions / Inserting static link into welcome email

Inserting static link into welcome email

Locked

Views: 2,701

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
15 Feb 2009, 11:11 PM
#1
nas170 avatar

nas170

New Zenner

Join Date:
Feb 2009
Posts:
2
Plugin Contributions:
0

Inserting static link into welcome email

Hello everyone,

I am having some trouble. All I want to do is insert a link in the welcome email that customers receive after creating an account. I'm very new to php and zen cart and am having trouble figuring out where I am going wrong.

This is my problem area in the create_account.php file:

define('EMAIL_TEXT', 'Login to your new account at the <a href="http://www.addressGoesHere.com">login page</a>.' . "\n\n");

The sentence shows up just fine in the email: Login to your new account at the login page. However, "login page" appears as regular text and is not a link.

All of the other dynamic links that were in the default email, such as STORE_OWNER_EMAIL_ADDRESS, etc., work just fine. Am I doing something wrong or would I be better off creating a variable for the link and inserting the variable name in the code instead? If so, in which file do I define the variable?

Thanks to anyone who takes the time to read this.

16 Feb 2009, 7:35 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Inserting static link into welcome email

Text-only emails will never contain any embedded HTML tags ... they are stripped out.
If you want the URL available in text-only emails, just insert the URL directly without any A HREF tag around it.

24 Feb 2009, 2:26 AM
#3
nas170 avatar

nas170

New Zenner

Join Date:
Feb 2009
Posts:
2
Plugin Contributions:
0

Re: Inserting static link into welcome email

Hi, thank you for replying.

I selected text only emails because I don't want to worry about images, etc. But the emails I receive do have links in them. It has a link to send an email to the store contact if you are having problems. This link is listed under the define('EMAIL_CONTACT' section and has actual html: <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">'

It works. However when I try to put a static link in there to my login page, it doesn't work. Should I try saving the address to the login page as a constant or variable somewhere, and write out the html like the email contact link? If so, where do I define the address? I'm very confused.

Thanks.

24 Feb 2009, 3:54 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Inserting static link into welcome email

You're likely referring to links that are built dynamically, probably using sprintf() function calls in conjunction with language files.

Since you're doing text-only, why not make it a LOT easier on yourself, and just spell things out directly, without HTML, like this:

"You can login to your account again by returning to our website, which is located at: http: // our_site .com "
(the extra spaces in the URL would be left out of course)

24 Sep 2009, 7:32 PM
#5
ptristan88 avatar

ptristan88

New Zenner

Join Date:
Feb 2005
Posts:
13
Plugin Contributions:
0

Re: Inserting static link into welcome email

I have just installed Zencart and have not looked into the email part about this yet, but if I can't have HTML code in my email then I'll have to change it as well. Not having HTML capablities in email is rediculous.

24 Sep 2009, 7:53 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Inserting static link into welcome email

[insert rollie-eyes here]
If you want to embed hard-coded links into specific emails that are HTML-formatted, feel free. You'll find the HTML-formatted email templates in the /email/ folder.
Just note that changes made to those templates will NOT affect the TEXT-Only emails that your store sends, because text-only emails DO NOT display HTML ... specifically because your customers have requested such.