Site maintenance: Tuesday 17 Nov, from 10:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / Help needed adding to welcome email text

Help needed adding to welcome email text

Started by mule on 1 Mar 2011, 4:13 PM · Views: 1,202

Results 1 to 9 of 9
1 Mar 2011, 4:13 PM
#1
mule avatar

mule

New Zenner

Join Date:
Jul 2010
Posts:
20
Plugin Contributions:
0

Help needed adding to welcome email text

I'm trying to add Facebook and Twitter links to my welcome email but I've been trying for a while now and I don't seem to be able to get the code correct as each time I try and add it the preview in the admin pages stops working.

The current code is this;

define('EMAIL_CONTACT', 'For help with any of our online services, please email the store-owner: <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">'. STORE_OWNER_EMAIL_ADDRESS ." </a>\n\n");
define('EMAIL_GV_CLOSURE', "\n" . 'Sincerely,' . "\n\n" . STORE_OWNER . "\nStore Owner\n\n". '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'.HTTP_SERVER . DIR_WS_CATALOG ."</a>\n\n");

I'd like to add a new line beneath the one that says "store owner" saying "Please visit our <a href="http://www.facebook.com/GardenSeedsUK">Facebook</a> and <a href="http://twitter.com/Garden_Seeds_UK">Twitter</a> pages for all the latest offers, news and product updates" with clickable links as shown.

Thanks for any help in advance.

2 Mar 2011, 1:56 AM
#2
mule avatar

mule

New Zenner

Join Date:
Jul 2010
Posts:
20
Plugin Contributions:
0

Re: Help needed adding to welcome email text

If there's an easier way to do this that still reads okay I'm open to suggestions. Would quite like to add the same to other automated emails.

2 Mar 2011, 4:39 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: Help needed adding to welcome email text

Just add the appropriate html to the end of the EMAIL_GV_CLOSURE define.

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

2 Mar 2011, 9:23 AM
#4
mule avatar

mule

New Zenner

Join Date:
Jul 2010
Posts:
20
Plugin Contributions:
0

Re: Help needed adding to welcome email text

DrByte:

Just add the appropriate html to the end of the EMAIL_GV_CLOSURE define.

Okay, so I changed the code to the following;

define('EMAIL_CONTACT', 'For help with any of our online services, please email the store-owner: <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">'. STORE_OWNER_EMAIL_ADDRESS ." </a>\n\n");
define('EMAIL_GV_CLOSURE', "\n" . 'Sincerely,' . "\n\n" . STORE_OWNER . "\nStore Owner\n\n". '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'.HTTP_SERVER . DIR_WS_CATALOG ."</a>\n\n");
Please visit our <a href="http://www.facebook.com/GardenSeedsUK">Facebook</a> and <a href="http://twitter.com/Garden_Seeds_UK">Twitter</a> pages for all the latest offers, news and product updates

And like before this stopped the preview loading on the admin page so clearly isn't right.

2 Mar 2011, 9:45 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Help needed adding to welcome email text

You need to include it inside the define().

Syntax is: define('CONSTANT_NAME', 'value');

So, since you're wanting to add more text to the "value" part, you need to include it there ... before the closing quotes and bracket and semicolon.

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

2 Mar 2011, 12:28 PM
#6
mule avatar

mule

New Zenner

Join Date:
Jul 2010
Posts:
20
Plugin Contributions:
0

Re: Help needed adding to welcome email text

Thanks for trying to help but still no luck.

Here's the code I tried.

define('EMAIL_GV_CLOSURE', "\n" . 'Sincerely,' . "\n\n" . STORE_OWNER . "\nStore Owner\n\n". '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'.HTTP_SERVER . DIR_WS_CATALOG . "</a>\n\n Please visit our <a href="http://www.facebook.com/GardenSeedsUK">Facebook</a> and <a href="http://twitter.com/Garden_Seeds_UK">Twitter</a> pages for all the latest offers, news and product updates");

Again, it wouldn't load the preview through the zen cart admin.

What have I done wrong?

2 Mar 2011, 9:59 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Help needed adding to welcome email text

You'll notice that by using double-quotes you've caused it to have mismatched quotation marks.

Try using single-quotes around your added content instead:```php
define('EMAIL_GV_CLOSURE', "\n" . 'Sincerely,' . "\n\n" . STORE_OWNER . "\nStore Owner\n\n". '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'.HTTP_SERVER . DIR_WS_CATALOG . "</a>\n\n" . ' Please visit our <a href="http://www.facebook.com/GardenSeedsUK">Facebook</a> and <a href="http://twitter.com/Garden_Seeds_UK">Twitter</a> pages for all the latest offers, news and product updates');

.
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 Mar 2011, 4:10 PM
#8
mule avatar

mule

New Zenner

Join Date:
Jul 2010
Posts:
20
Plugin Contributions:
0

Re: Help needed adding to welcome email text

Excellent! Thank you so much DrByte, that worked perfectly.

24 Oct 2012, 8:31 AM
#9
christospur avatar

christospur

New Zenner

Join Date:
Sep 2012
Posts:
40
Plugin Contributions:
0

Re: Help needed adding to welcome email text

Mule:

Excellent! Thank you so much DrByte, that worked perfectly.

:smartalec: Hello, please could you copy/paste the exact text you used for this FB/Twitter link?

Mine doesnt seem to work, even though i followed the above thread :-/