Forums / Templates, Stylesheets, Page Layout / Duplicate disclaimers in TEXT-only email

Duplicate disclaimers in TEXT-only email

Locked

Views: 1,707

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
6 Nov 2008, 8:35 AM
#1
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Duplicate disclaimers in TEXT-only email

So, I'm running general tests on my site and I noticed something strange. I created two test customer accounts -- one for HTML emails and the other set up to receive TEXT-only emails.

When the HTML email customer receives order confirmation emails, everything is fine -- just one disclaimer at the end.

But when the TEXT-only customer receives order confirmation emails, they get two disclaimers at the end -- a properly formatted one and then one with the HTML tags visible.

This is what my TEXT-only email customers get:

No payment necessary -- it's free!

Used with purchases via Free Charge


This email address was given to us by you or by one of our customers. If you
feel that you have received this email in error or if you wish to no longer
receive emails from us, please send an email to [email protected].
We will remove your email from our list.

You can also contact us at:

The Yaoi 911 Store
2370 Market Street
Suite 339
San Francisco, CA 94114
(206) 202-3243


Copyright (c) 2008 The Yaoi 911™ Store

This email address was given to us by you or by one of our customers. If you
feel that you have received this email in error or if you wish to no longer
receive emails from us, please send an email to [email protected].
We will remove your email from our list. <br /><br />

You can also contact us at: <br /><br />

The Yaoi 911 Store<br />
2370 Market Street<br />
Suite 339<br />
San Francisco, CA 94114<br />
(206) 202-3243
This email is sent in accordance with the US CAN-SPAM Law in effect
01/01/2004. Removal requests can be sent to these addresses and will be
honored and respected.

I did alter the code in email_extras.php. This is what I used:

// email disclaimer
  define('EMAIL_DISCLAIMER', 'This email address was given to us by you or by one of our customers. If you feel that you have received this email in error or if you wish to no longer receive emails from us, please send an email to %s.  We will remove your email from our list. <br /><br />
  
  You can also contact us at: <br /><br />
  
  The Yaoi 911 Store<br /> 
  2370 Market Street<br />
  Suite 339<br />
  San Francisco, CA 94114<br />
  (206) 202-3243 ');
  define('EMAIL_SPAM_DISCLAIMER','This email is sent in accordance with the US CAN-SPAM Law in effect 01/01/2004. Removal requests can be sent to these addresses and will be honored and respected.');
  define('EMAIL_FOOTER_COPYRIGHT','Copyright (c) ' . date('Y') . ' <a href="' . zen_href_link(FILENAME_DEFAULT) . '" target="_blank">' . STORE_NAME . '</a>' );
  define('TEXT_UNSUBSCRIBE', "\n\nTo unsubscribe from future newsletter and promotional mailings, simply click on the following link: \n");

What have I done wrong that has created this duplicate disclaimer business for my TEXT-only customers? I can't seem to figure it out.

Please let me know. Thank you!

Alex

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

8 Nov 2008, 12:17 AM
#2
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Duplicate disclaimers in TEXT-only email

I'm sorry to bump this thread, but I'm really not sure how to fix this. I even took a look at email_template_checkout.html to see if there was some duplicate code in there, but it doesn't look like it. (I even tried commenting out $EXTRA_INFO in that file just in case it was somehow pulling duplicate material from email_extras.php -- it didn't help.)

Is there some other template that builds the TEXT-only emails for the Confirmation Emails?

(Looking up "EMAIL_DISCLAIMER" in ALL FILES in the Developer Toolkit didn't bring me any obvious culprits -- is it includes/classes/order.php? I'm not sure, but maybe I'm just being dense.....)

Does anyone have any idea of how I can track down this error? It really makes my text-only emails look unprofessional...

Any help would be greatly appreciated. :smile:

Thank you,

Alex

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

8 Nov 2008, 5:46 AM
#3
chuck avatar

chuck

Totally Zenned

Join Date:
Jul 2005
Posts:
255
Plugin Contributions:
0

Re: Duplicate disclaimers in TEXT-only email

This is just a guess, but I think the disclaimer is being duplicated because of the <br /> tags you've inserted.

Try changing your <br /> tags to: ' . "\n" . ' (yes, that's single-quote space dot double-quote backslash n double-quote space dot space single-quote)

8 Nov 2008, 7:12 AM
#4
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Duplicate disclaimers in TEXT-only email

Chuck, you're a genius! :clap:

I removed the <br />'s and suddenly no duplications for my TEXT-only emails. Interestingly enough, while the plain text emails recognize the "/n" code you recommend, they also respond to regular old carriage returns. And unfortunately, the HTML email doesn't respond to the "/n" code at all -- it just runs the lines together.

Frankly, it's better to have the run-on lines in the HTML email than the duplicate disclaimers in the plain text, but it's a shame that there isn't a way to format them both appropriately.

(It's also strange the the <br /> tags don't cause me any problems in my welcome email, but cause such woe here...)

Anyway, though, I really appreciate your help. Thank you!

Alex

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

8 Nov 2008, 11:05 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Duplicate disclaimers in TEXT-only email

I think if you use \n instead of /n then the line-breaks should be auto-inserted in the HTML.

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

8 Nov 2008, 8:08 PM
#6
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Duplicate disclaimers in TEXT-only email

:oops:

Thank you for your reply, DrByte. Actually, I did use ' . "\n" . ' ( I copied and pasted from chuck's helpful reply -- I just screwed it up with that forward slash when I wrote my reply here on this forum...)

Sorry about being unclear... :blush:

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6