Forums / Templates, Stylesheets, Page Layout / 10 hours later... how to edit PLAIN TEXT emails?

10 hours later... how to edit PLAIN TEXT emails?

Locked

Views: 1,235

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
29 Aug 2009, 3:15 AM
#1
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

10 hours later... how to edit PLAIN TEXT emails?

I've read tons of threads, tutorials and the wiki...
but I can't figure out how to add a couple lines of text to my PLAIN TEXT emails?!?!?

According to the Wiki, plain text emails are just HTML emails with the HTML stripped out...
yet my PLAIN TEXT emails are missing parts of the text that I included in the HTML emails.

As an example, towards the bottom of the email I want to add the line: "Leave us feedback"
I've already got "orders.php" open and I'm browsing the area around line 827... how do I add plain text?

Since most threads on the forum seem to address the opposite problem...
I could use a little help getting my PLAIN TEXT emails formatted.

I've been working on this all day long... need some insight please.

Thanks

29 Aug 2009, 3:39 AM
#2
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Re: 10 hours later... how to edit PLAIN TEXT emails?

As I look closer at the source code for this multipart email (Order Confirmation)...
I'm extremely perplexed... something ain't right!

Everyone has these two code snippets at the bottom of their emails:

<div class="disclaimer">
  <div class="disclaimer1">$EMAIL_DISCLAIMER</div>
  <div class="disclaimer2">$EMAIL_SPAM_DISCLAIMER</div>
</div>

Both these template tags show up in the HTML version of the email...
but when I switch to Plain Text only the $EMAIL_DISCLAIMER appears... the CAN-SPAM tag is missing!!

Can anyone tell me why that's happening?
There's no logic here, it's arbitrarily stripping parts of the code!!

I'm using Thunderbird btw...

29 Aug 2009, 4:05 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: 10 hours later... how to edit PLAIN TEXT emails?

blackhalo:

According to the Wiki, plain text emails are just HTML emails with the HTML stripped out...
I'm not sure where exactly you read that, but it's not entirely correct, at least not as far as system-generated emails are concerned.

In Zen Cart v1.x, the plain-text emails are built by assembling together several different constants defined in language files, along with certain pieces of data relevant to the type of email being sent, in a prescribed order.

(In the upcoming v2, all the emails are built from easily-edited templates which you can manage yourself with a simple text editor ... way more intuitive.)

I'm not sure what exactly you're trying to change, and on which emails you're trying to change it, nor which files you've edited and/or customized. Or which version of Zen Cart you're using, and which addons you have installed including language packs and templates.

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

29 Aug 2009, 4:25 AM
#4
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Re: 10 hours later... how to edit PLAIN TEXT emails?

I'm using v1.3.8a with the security patch... no language packs.

For simplicity sake, I just want to add a single line of text to the order confirmation email...
I can't for the life of me add the line "Please leave us feedback" to a plain text email.

I've mastered the HTML output...
but there's elements that MUST be integrated in the PLAIN version.

From what I can tell, I include something like this in order.php:

$html_msg['LEAVE_FEEDBACK'] = 'Please leave us feedback';

Then I add the template tag to the html email:

$LEAVE FEEDBACK

Am I on the wrong track here?

29 Aug 2009, 4:43 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: 10 hours later... how to edit PLAIN TEXT emails?

If you're wanting to add that to HTML emails, then you're on the right track.

If you want it added to plain-text emails, you'll need to add your message to the $email_order variable in the appropriate place so that it shows in the appropriate sequence.

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

29 Aug 2009, 5:01 AM
#6
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Re: 10 hours later... how to edit PLAIN TEXT emails?

I see, I got HTML on the brain...

So where do I define the text... do I use "$html_msg" on order.php?
Or do I define it in "email_extras.php" or somewhere else?

I appreciate the help DrByte...
after two years of work, I've finally gotten around to tweaking the emails...
this plain text edit has been hard tho (looking forward to v2)!

29 Aug 2009, 6:46 AM
#7
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Re: 10 hours later... how to edit PLAIN TEXT emails?

Alright, I got it...

Oddly though, some bold items stay bold in Plain Text mode (NOT Simple HTML)... as well, some hotlinks stay linked...
which is very cool, as it looks much nicer and helps bring attention to important conversion techniques in the plain text email.

I just can't duplicate them... not sure why some do and some don't.

29 Aug 2009, 4:23 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: 10 hours later... how to edit PLAIN TEXT emails?

That's most likely a function of your email reader.

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