Zen Cart Logo
Forums / General Questions / Hyperlinks in Comments Section of Order Update Emails

Hyperlinks in Comments Section of Order Update Emails

Locked

Views: 1,288

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
16 Sep 2009, 8:36 PM
#1
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Hyperlinks in Comments Section of Order Update Emails

Hi,

When sending out Order Update emails via the store is there any way to have hyperlinks in the "comments" section? We often add tracking links for example and our customers would like to be able to simply click the link.

When sending text based emails we have no problem as the users email program usually takes care of this but in HTML email all inserted links remain as text.

Is there any way around this?

Brent

17 Sep 2009, 1:17 PM
#2
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: Hyperlinks in Comments Section of Order Update Emails

Looking into this further I can add my comments as follows:

<a href="http:www.mydomain.com">Click here</a>

The problem is that while they are fine in the email sent to the customer they are a mess when view via the customers account. Especially with long tracking links which is what I am trying to add.

So is there any way for the comments field on the store to interpret HTML tags so the customer only sees "Click Here"?

22 Nov 2010, 10:53 PM
#3
art75 avatar

art75

New Zenner

Join Date:
Aug 2010
Posts:
12
Plugin Contributions:
0

Re: Hyperlinks in Comments Section of Order Update Emails

Hi. Have you found any solution to the problem Brent ?
Long links are my headache too... :blush:

23 Nov 2010, 11:54 AM
#4
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: Hyperlinks in Comments Section of Order Update Emails

I'm afraid not.

24 Nov 2010, 6:56 PM
#5
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Hyperlinks in Comments Section of Order Update Emails

Man, I'm in need of a solution here as well!

Any help from any well respected veterans would be greatly appreciated!

Gautama

24 Nov 2010, 10:24 PM
#6
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Hyperlinks in Comments Section of Order Update Emails

Figured this out:smile:

In orders.php on line 569 change

echo '            <td class="smallText">' . nl2br(zen_db_output($orders_history->fields['comments'])) . ' </td>' . "\n" .

to the following:

echo '            <td class="smallText">' . nl2br(zen_db_scrub_out($orders_history->fields['comments'])) . ' </td>' . "\n" .

You also need to do the same thing in invoice.php on line 247.

Hope this helps you guys, helped me quite a bit!

25 Nov 2010, 7:22 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: Hyperlinks in Comments Section of Order Update Emails

Beware of several things:
a) the proposed "fix" won't work if you don't have the required additional custom code (not mentioned here) installed on your site.
b) by allowing hyperlinks you open yourself up to security vulnerabilities (there is actually a reason why hyperlinks were not allowed in the first place :blush: )

MUCH safer, and simpler, is to just post the actual real URL, without turning it into a hyperlink. Most email clients will automatically make that link clickable, and thus customers have quick easy access to the details you're providing.

25 Nov 2010, 3:04 PM
#8
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: Hyperlinks in Comments Section of Order Update Emails

DrByte:

MUCH safer, and simpler, is to just post the actual real URL, without turning it into a hyperlink. Most email clients will automatically make that link clickable, and thus customers have quick easy access to the details you're providing.

That's what I assumed and it was only when a couple of customers complained that I started this post. Using Thunderbird and sending text only emails all links are made clickable.

As soon as I enable HTML the links arrive as plain text. It is only the links in the "comments section" that are plain text. All the rest are clickable but then they are hard coded into the email template.

I'd assumed this was a Zen Cart issue but will look into this further from the Thunderbird side.

25 Nov 2010, 4:49 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: Hyperlinks in Comments Section of Order Update Emails

Yes, if you've set the site to send HTML emails, then your email client/reader will NOT convert non-hyperlinked links into clickable items.
That is the downside.