Forums / Templates, Stylesheets, Page Layout / Tell-A-Friend messages stripped of HTML format

Tell-A-Friend messages stripped of HTML format

Views: 1,897

Results 1 to 11 of 11
6 May 2011, 7:58 PM
#1
worldmaker avatar

worldmaker

Zen Follower

Join Date:
Jul 2006
Location:
Manchester
Posts:
139
Plugin Contributions:
0

Tell-A-Friend messages stripped of HTML format

Upgraded to version 139h.

I'm testing the cart and found that Tell-A-Friend messages are coming through in plain text, stripped of or lacking HTML template formatting - there is no HTML in the messages when I view sources on receipt.

Other messages, such as Welcome and Order Confirmation are coming through with beautiful HTML formatting, very pretty, but not Tell-a-Friend.

E-mail Options ARE set True to "Use MIME HTML when sending messages".

I have installed the "Captcha Using TTF and Guest Reviews" mod. to protect against spamming and wonder if this might be causing some conflict on this specific function.

The email_template_tell_a_friend.html file IS present in the root\email folder on the site, so that shouldn't be a problem.

There don't appear to by any easily visible syntax errors on the email_extras.php in either locations.

Currently confused. Any suggestions?

:unsure:

"Why dumb down when we can rise up?" Worldmaker / BonDevZone Store

7 May 2011, 9:02 PM
#2
worldmaker avatar

worldmaker

Zen Follower

Join Date:
Jul 2006
Location:
Manchester
Posts:
139
Plugin Contributions:
0

Re: Tell-A-Friend messages stripped of HTML format

I've been trying to discover where the break in the processing might be occurring, but can't find an easy way through the maze of php files.

Can anyone point me to the paths whereby the Tell-A-Friend form triggers the email_template_tell_a_friend.html? Or any of the email templates, so I can compare how they are processed to find any possible break in the logic?

There has to be a reason, either a break or a conflict, that's causing this behaviour, or is this normal?

:lookaroun

"Why dumb down when we can rise up?" Worldmaker / BonDevZone Store

8 May 2011, 9:54 PM
#3
worldmaker avatar

worldmaker

Zen Follower

Join Date:
Jul 2006
Location:
Manchester
Posts:
139
Plugin Contributions:
0

Re: Tell-A-Friend messages stripped of HTML format

Up-date of research.
Just in case anyone wants to offer the basic advice, here are the points I've covered today.

(1) Removed the suspect Captcha elements and replaced with original files, but that had no effect, so it wasn't the problem.

(2) Switched template over to Classic, no effect, still no HTML messages.

(3) Completely reloaded the entire cart, all files, no effect so no problem with missing files.

Conclusion to-date, either it's a switch I've made somewhere deep in the system and not documented or a bug the doesn't produce html formatted Tell-A-Friend e-mails.

Will continue when I can.

:frusty:

"Why dumb down when we can rise up?" Worldmaker / BonDevZone Store

12 May 2011, 7:56 AM
#4
ksl1 avatar

ksl1

New Zenner

Join Date:
Feb 2010
Posts:
28
Plugin Contributions:
0

Re: Tell-A-Friend messages stripped of HTML format

I have recently done a clean install of 1.3.9.h and still configuring. The tell a friend is working fine, though like you say, no HTML formatting.
I have not yet installed the new TTF and GR addon, yet as i am still trying to get the product review working correctly. So it looks like the 1.3.9.h Tell a friend maybe without the html. Well it's not your addon anyway.

12 May 2011, 11:25 AM
#5
worldmaker avatar

worldmaker

Zen Follower

Join Date:
Jul 2006
Location:
Manchester
Posts:
139
Plugin Contributions:
0

Re: Tell-A-Friend messages stripped of HTML format

ksl1:

I have recently done a clean install of 1.3.9.h and still configuring. The tell a friend is working fine, though like you say, no HTML formatting.
I have not yet installed the new TTF and GR addon, yet as i am still trying to get the product review working correctly. So it looks like the 1.3.9.h Tell a friend maybe without the html. Well it's not your addon anyway.

I've been mulling this over for the last couple of days and have a sneaky feeling it's disabled.

All other messages carry your brand logo and formatting, but would you really want that same formatting on a message supposedly sent from a "friend"?

Something simpler might work better, so for now I'm not going to worry about the lack of HTML formatting on Tell-A-Friend messages.

:unsure:

"Why dumb down when we can rise up?" Worldmaker / BonDevZone Store

12 May 2011, 12:14 PM
#6
ksl1 avatar

ksl1

New Zenner

Join Date:
Feb 2010
Posts:
28
Plugin Contributions:
0

Re: Tell-A-Friend messages stripped of HTML format

yes it was disabled, what made it worse was the fact i never even noticed the button becuase i am colour blind with red & green, it appeared green to me because of the lights reflection.

But I recalled the legend on buttons in the admin, that i just decided to press it, and it worked.:frusty: But at least I had a good introduction to my way around the files.

12 May 2011, 3:45 PM
#7
worldmaker avatar

worldmaker

Zen Follower

Join Date:
Jul 2006
Location:
Manchester
Posts:
139
Plugin Contributions:
0

Re: Tell-A-Friend messages stripped of HTML format

ksl1:

yes it was disabled, what made it worse was the fact i never even noticed the button becuase i am colour blind with red & green, it appeared green to me because of the lights reflection.

Sorry, my mistake, what I meant was that the HTML processing is probably disabled at source code level, so it only produces plain text mails without all the Store styling.

The "Allow Guest To Tell-A-Friend" function is probably off as an initial default, but it's that end formatting of the message that was worrying me.

:wacko: ... it's now been another looong day.

"Why dumb down when we can rise up?" Worldmaker / BonDevZone Store

12 May 2011, 4:29 PM
#8
ksl1 avatar

ksl1

New Zenner

Join Date:
Feb 2010
Posts:
28
Plugin Contributions:
0

Re: Tell-A-Friend messages stripped of HTML format

worldmaker:

Sorry, my mistake, what I meant was that the HTML processing is probably disabled at source code level, so it only produces plain text mails without all the Store styling.

The "Allow Guest To Tell-A-Friend" function is probably off as an initial default, but it's that end formatting of the message that was worrying me.

:wacko: ... it's now been another looong day.

it's now been another looong day, tell me about it! I've been sat here for a good 12 hrs, plodding around. I've searched high and low for a switch for HTML tell a friend, if there was one, there would be a text/html box to choose from i would think. Oh well rest i need, can't even think straight at the moment.

12 May 2011, 8:33 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: Tell-A-Friend messages stripped of HTML format

It is working as designed:
a) ALL outgoing emails are sent in text-only format unless two conditions are met: (i) HTML/MIME format is enabled store-wide, and (ii) the recipient's email address is also a registered customer on your site AND they've selected to receive emails in HTML format (in their My Account preferences).
b) Additionally, Tell A Friend cripples any HTML "message" entered on the tell-a-friend screen by whomever is "telling their friend". This is to disallow rogue/XSS/CSRF and other misuse of the email system since you're essentially opening up your site to be an email relay/spam system, and not stripping out the HTML could be very hazardous.

Seems like you're tripping on (a) above. However, it's working exactly as designed. There are no switches to hunt down. No special magic settings to change. It's doing exactly what it's supposed to do.

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

13 May 2011, 8:36 AM
#10
worldmaker avatar

worldmaker

Zen Follower

Join Date:
Jul 2006
Location:
Manchester
Posts:
139
Plugin Contributions:
0

Re: Tell-A-Friend messages stripped of HTML format

DrByte:

It is working as designed:
a) ALL outgoing emails are sent in text-only format unless two conditions are met: (i) HTML/MIME format is enabled store-wide, and (ii) the recipient's email address is also a registered customer on your site AND they've selected to receive emails in HTML format (in their My Account preferences).
b) Additionally, Tell A Friend cripples any HTML "message" entered on the tell-a-friend screen by whomever is "telling their friend". This is to disallow rogue/XSS/CSRF and other misuse of the email system since you're essentially opening up your site to be an email relay/spam system, and not stripping out the HTML could be very hazardous.

Seems like you're tripping on (a) above. However, it's working exactly as designed. There are no switches to hunt down. No special magic settings to change. It's doing exactly what it's supposed to do.

Ah Ha! Clarification at last!

I fully agree with the HTML stripping against spammers.

I'll make notes of this for my own mini-manual. I knew there had to be something in there causing this behaviour but I couldn't find it.

On the subject of guests sending messages to "friend" I've disabled this completely - no message box - and send out my own friendly invitation instead to block such misuse. If a customer or guest wants to know the message in advance they can always send it to themselves.

:D

"Why dumb down when we can rise up?" Worldmaker / BonDevZone Store

13 May 2011, 10:24 AM
#11
ksl1 avatar

ksl1

New Zenner

Join Date:
Feb 2010
Posts:
28
Plugin Contributions:
0

Re: Tell-A-Friend messages stripped of HTML format

Much Appreciated DrByte! Now that is settled and out of the way!