Zen Cart Logo
Forums / General Questions / Adding some text in the Order Confirmation Mail

Adding some text in the Order Confirmation Mail

Locked

Views: 1,737

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
12 May 2007, 7:29 AM
#1
jack82 avatar

jack82

New Zenner

Join Date:
May 2007
Posts:
19
Plugin Contributions:
0

Adding some text in the Order Confirmation Mail

Hi! I already posted a message some days ago on how to customize the order confirmation mail and got some precious help but still haven't found what I'm looking for ...!

I would simlly like to add a few lines of text (like adding some information about my bank account number or such things) at the bottom of the mail.

I was told to add my text between the " " in the define of the checkout_success.php and it worked but it just all came on the same line and that really isn't good!
I tried the <br /> and th /n but they didn't work to break the line ...

So really, how can I add some simple text to the order confirmation mail...like 5 or 6 lines ?!

Thanks very much in advance for any help !
Jack

12 May 2007, 8:33 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding some text in the Order Confirmation Mail

Look at the email templates in /email and I think that you want either the checkout or the order status....

Would not place your bank account # in any mail!!!

12 May 2007, 12:45 PM
#3
jack82 avatar

jack82

New Zenner

Join Date:
May 2007
Posts:
19
Plugin Contributions:
0

Re: Adding some text in the Order Confirmation Mail

Hi and thanks for your reply Kobra!

Should I edit the email template you told me by adding my text into its body ?

I mean isn't the file I have to edit the checkout_success.php one ? Because if I edit the checkout_success.php , I do see the changes in the mails but as I said I had those break lines problem...
So I should try editing the email template, right ? are the checkout_success.php file and the email_template_checkout.html connected ?

Thanks a lot again !
Jack

12 May 2007, 4:36 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding some text in the Order Confirmation Mail

When you look at these your will see that they include mostly variables that are taken from other places...and why your <br />'s are not being used.

I would try adding your desired text to this as a <p> tag and send one to yourself to insure that it parses correctly. I think that the 2 are only connected via the order # and order status in other places(DB)

12 May 2007, 4:41 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Adding some text in the Order Confirmation Mail

It's probably best to use the \n to insert line-breaks, since that will handle the text-only emails, and when the text-only content is converted to HTML, the \n are converted to <br> automatically.

Remember, the \n must be inside double-quotes. So if you're adding it inside content that's only inside single-quotes, you'll have to break it up like this:

define('MY_CONSTANT', 'This is on line one. ' . "\n" . 'And this is on line two.');
12 May 2007, 6:18 PM
#6
jack82 avatar

jack82

New Zenner

Join Date:
May 2007
Posts:
19
Plugin Contributions:
0

Re: Adding some text in the Order Confirmation Mail

Hi! Thank you both for your answers !
For the moment I just tried what DrByte told me and it works ! :smile:

I just added a "\n" (with a dot before and after it) into my define just like you said and it worked.

Thank you very much for your help !
Jack

12 May 2007, 8:18 PM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding some text in the Order Confirmation Mail

Good Call as DrByte is the "Master"