Zen Cart Logo
Forums / General Questions / Add text to Order Confirmation emails (Text email only)

Add text to Order Confirmation emails (Text email only)

Views: 963

Results 1 to 7 of 7
16 Sep 2012, 7:51 PM
#1
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Add text to Order Confirmation emails (Text email only)

Being a UK store I have to provide customers with a copy of their rights under the Distance Selling Regulations in a durable medium. This means that just having it on the website is not enough.
The simple solution is to include it on their order confirmation email.
Inserting the relevant text in email_template_checkout.html file above the footer seems to be the easiest way for HTML emails.
I am at a bit of a loss as to how to add it to text emails. I would very much appreciate it if someone could point me to the correct files to edit to insert text only in the text version of the Order Confirmation email.

Many thanks.

17 Sep 2012, 9:43 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Add text to Order Confirmation emails (Text email only)

/includes/classes/order.php
See the send-order-email function

17 Sep 2012, 6:48 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: Add text to Order Confirmation emails (Text email only)

Or just edit one of the existing phrases already in the confirmation email, and add your extra text to that phrase.

The fast way to find out which specific file to edit, especially for existing text, is by using the Developers Toolkit in your Admin:
http://www.zen-cart.com/content.php?80-how-do-i-find-out-what-files-to-edit
http://www.zen-cart.com/content.php?81-how-do-i-use-the-developers-toolkit

18 Sep 2012, 8:19 AM
#4
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Re: Add text to Order Confirmation emails (Text email only)

Thanks.
I' shall give it a go and report back.

18 Sep 2012, 2:57 PM
#5
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Re: Add text to Order Confirmation emails (Text email only)

I've defined the statement in includes\languages\english\checkout_process.php as EMAIL_TEXT_DSR
Where should I insert in /includes/classes/order.php?
I tried adding below
//addresses area: Billing
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
and it was inserted into the email but it made the email double up - everything was duplicated .

I added below
$email_order .= PAYMENT_METHOD_GV . "\n\n";
and it broke the checkout.

Ideally I'd like to add it just above the disclaimer.

Thanks.

18 Sep 2012, 9:39 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Add text to Order Confirmation emails (Text email only)

If you want it just above the disclaimer, then:```php
$email_order .= EMAIL_TEXT_DSR . "\n\n";
// include disclaimer

19 Sep 2012, 9:47 AM
#7
gsh68 avatar

gsh68

Zen Follower

Join Date:
Mar 2011
Posts:
103
Plugin Contributions:
0

Re: Add text to Order Confirmation emails (Text email only)

That's the one!
Many thanks.