Zen Cart Logo
Forums / General Questions / Adding info. to order confirmation email - URGENT!

Adding info. to order confirmation email - URGENT!

Locked

Views: 2,638

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
24 Jul 2008, 2:55 PM
#1
joannadingle avatar

joannadingle

New Zenner

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

Adding info. to order confirmation email - URGENT!

Hi all!

I REALLY hope this is just me being a dumb brunette not being able to find this.

When people order, they get an automatic order confirmation email with the order details, order number, their details etc.

I have four payment options, COD, cheque, paypal and bank transfer. Bank transfer is the most popular by far BUT (this is the problem), I have given my bank details under the bank transfer option when the customer selects the payment method, but then they never see it again and although I have put a 'payment and shipping' info box on my main page, they still aren't finding the details and I keep getting emails asking for my bank account number.

What I need to do is somehow get my bank account details into the order confirmation email that the customer receives, but I have looked everywhere and can't find how to write into that message. Could someone please post a path (is that what it is called?) so that I can find my way to this?

Thanks in advance for your help on this!
Best wishes,
Jo

24 Jul 2008, 5:21 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Adding info. to order confirmation email - URGENT!

You can HARD CODE this in the email template that is used to send order confirmation.

In your ROOT DIRECTORY where your zencart is installed, you will see a folder called:

email

Inside this folder is a file:

email_template_checkout.html

Open it in a Plain Text Editor, such as NOTEPAD++ or CRIMSON EDITOR

Find the lines (around line 99) that begin:

        <td class="payment-detail">$PAYMENT_METHOD_DETAIL</td>
      </tr>
      <tr>

Then directly under the <tr> tag... add the following, adjusting the text according to your needs (do not erase the <br /> tags):

        <td class="content">For customers paying by Bank Transfer<br />Bank Name: XYZ BANK<br />SORT CODE: 40 04 09<br />ACCOUNT NUMBER: 12345 67890</td>
      </tr>

So it now looks like:

        <td class="payment-detail">$PAYMENT_METHOD_DETAIL</td>
      </tr>
      <tr>
        <td class="content">For customers paying by Bank Transfer<br />Bank Name: XYZ BANK<br />SORT CODE: 40 04 09<br />ACCOUNT NUMBER: 12345 67890</td>
      </tr>

SAVE the file to its original directory

DO A TEST ORDER TO YOUR TEST CUSTOMER (That's normally YOU!)

Remember, there is no over-ride for this, so if you UPGRADE your ZC later, you will have to effect this edit again.

24 Jul 2008, 5:37 PM
#3
bodyjewelrystores avatar

bodyjewelrystores

Zen Follower

Join Date:
Jun 2006
Posts:
123
Plugin Contributions:
0

Re: Adding info. to order confirmation email - URGENT!

There is actually something simple you can do, without hard-coding the email template as described above - you could just change the title of "bank transfer" (in payment options) to include the details.

Just check the folder "includes/languages/english/modules/payment" under the root directory of your Zen Cart store.
I do not use the bank transfer module, so I don't know which file you should open, but it should probably be something like "banktransfer.php" or "bank.php" - you should know it by the file name.

In this file, the first "define" line (or one of the first one) should start something like this:

 define('MODULE_PAYMENT_BANKTRANSFER_TEXT_TITLE', 'Bank Transfer');

(it may not be exactly "BANKTRANSFER", again, depends on the module, but the capital letters section should end with _TEXT_TITLE - this is the line you're looking for)

So just change the final portion, 'Bank Transfer', to something like 'Bank Transfer - [your details here, account number etc]'.

This way it will automatically be included in the confirmation email, as the title of the payment module is taken straight from this file.

Good luck..

24 Jul 2008, 5:46 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town &amp; London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Adding info. to order confirmation email - URGENT!

Bodyjewelrystores suggestion is the "more appropriate" route, and I debated whether to advise this method, or to do the hard-code I originally advised.

However, from your original post, you seem to be a "newbie",

Could someone please post a path (is that what it is called?)

...so if you're struggling with these fundamental concepts editing the php may be challenging.

Either method will give you the desired result - as long as you know what you're doing... Using the PHP route, you can also embed HTML tags such as <br /> to give proper structure to the message. Also, editing the DEFINE in the php will result in the bank details only being shown in the e-mail, when that payment option is selected by the shopper.

19 Sep 2008, 4:19 PM
#5
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Adding info. to order confirmation email - URGENT!

this worked well for me

[quote=microbe]

in the file includes/classes/order.php on or about line 955 find:

$html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV );

add after it the following line obviously replacing items your details:

if ($GLOBALS[$payment_class]->title == "Direct Bank Deposit"){ $html_msg['PAYMENT_METHOD_DETAIL'].= "<div style='text-align:left'><br><strong><span style='color:#FF0000'>Bank details</style></strong><br>Bank: ******<br>Account name: ******<br>BSB: ******<br>Account: ******<br>Reference: CID-" . $_SESSION['customer_id'] . "</div>";}

I preferred to have bank details left aligned hence the <div>. Also highlighted the header in red.

The reference at the end is so that I can match the customer to the payment. I would much rather include the invoice number but I couldn't figure how to pick it up on the checkout page so customer ID will do. Didn't want to spend any more time on it. May come back to that.

http://www.zen-cart.com/forum/showthread.php?t=86654

5 May 2011, 3:21 PM
#6
hotmeil avatar

hotmeil

New Zenner

Join Date:
May 2011
Posts:
1
Plugin Contributions:
0

Re: Adding info. to order confirmation email - URGENT!

Great! thanks for the heads up. It is really important to see more updates though. Nice posts! I am able to reach out to a lot of people with a lot of information for my research. Thanks for the heads up. I will also share these with my friends.

Hotmail