Page 1 of 1

OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 4:02 pm
by eddy
Just as the title says: BankTransfer details are not sent to customer via email.
Doesn't work neither on 1.5.0 neither on 1.5.1.1

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 4:09 pm
by uksitebuilder
Does a comment get added to the order in your admin containing the bank details ?

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 4:19 pm
by fido-x
Let me get this straight.

You want to send a customer's bank account details in a "plain text" email that can easily be read by any packet sniffer so the WHOLE WORLD can see it? Might as well put their credit card information in there as well.

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 4:26 pm
by uksitebuilder
It is standard practice to send bank details via email to your customers.

There's less information than there is on a cheque.

All they can do with the info is pay into the account.

I don't see the problem.

I believe the same thing is also happening with cheque payments, no info on who to make the cheque payable to etc is sent in the order confirmations.

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 4:32 pm
by fido-x
The email already contains the customer's name and address, adding the bank account details (account number, BSB, etc) provides a scammer or hacker with enough information to wipe out that customer's bank account before they've even received the confirmation email.

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 4:35 pm
by uksitebuilder
It's not the customer's address we are referring to, it is the store holder's

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 4:51 pm
by eddy
I would like it to be so that MY bank account number (number to which customer will transfer money) would be emailed to the customer.
uksitebuilder wrote:Does a comment get added to the order in your admin containing the bank details ?
Yes

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 4:52 pm
by fido-x
uksitebuilder wrote:It's not the customer's address we are referring to, it is the store holder's
You mean bank details.

I must admit that I haven't looked at a lot of the payment modules (only those that I use myself, ie. free checkout and paypal), so I guess I've shown my ignorance on this one. :-[

Yes, uksitebuilder is right. There should be a comment in the email showing the "Bank Transfer Instructions" you entered in the admin. This should contain instructions for the customer on how to make the transfer, including your bank details (account number, BSB, etc).

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 5:43 pm
by Daniel
add it to the bug tracker please.

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 6:10 pm
by uksitebuilder
Will add it to the tracker.

Just to note, the details are sent in the plain text email the admin receives.

I think I have narrowed it down to catalog/view/theme/default/template/mail/order.php not referencing the available comment data

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Thu Aug 04, 2011 7:34 pm
by fido-x
Try this. In "catalog/model/checkout/order.php" (at around line 253), insert:

Code: Select all

$template->data['text_comment'] = $language->get('text_new_comment');
if ($order_info['comment']) {
    $template->data['comment'] = $order_info['comment'];
} 
Then, in "catalog/view/theme/default/template/mail/order.tpl", insert:

Code: Select all

<?php if ($comment) { ?>
<p><?php echo $text_comment; ?></p>
<p><?php echo $comment; ?></p>
<?php } ?>
before:

Code: Select all

<p><?php echo $text_footer; ?></p>
Haven't tested it, but it looks like it should work.

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Fri Aug 05, 2011 2:33 am
by eddy
fido-x wrote:Try this. In "catalog/model/checkout/order.php" (at around line 253), insert:

Code: Select all

$template->data['text_comment'] = $language->get('text_new_comment');
if ($order_info['comment']) {
    $template->data['comment'] = $order_info['comment'];
} 
Then, in "catalog/view/theme/default/template/mail/order.tpl", insert:

Code: Select all

<?php if ($comment) { ?>
<p><?php echo $text_comment; ?></p>
<p><?php echo $comment; ?></p>
<?php } ?>
before:

Code: Select all

<p><?php echo $text_footer; ?></p>
Haven't tested it, but it looks like it should work.
Thanks for fast reply, but i am now getting an error:

Notice: Undefined variable: comment in /home/dragonltu/domains/galidejas.lt/public_html/shop/catalog/view/theme/galidejas/template/mail/order.tpl on line 162

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Fri Aug 05, 2011 2:39 am
by fido-x
OK, change this bit that you added to "catalog/model/checkout/order.php" from:

Code: Select all

if ($order_info['comment']) {
    $template->data['comment'] = $order_info['comment'];
} 
to:

Code: Select all

if ($order_info['comment']) {
    $template->data['comment'] = $order_info['comment'];
} else {
    $template->data['comment'] = '';
} 

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Fri Aug 05, 2011 3:23 am
by eddy
Error disappeared, but the bank details are still missing in the email.

Now, I might be wrong, but maybe your last peace of code is missing language get?

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Fri Aug 05, 2011 3:37 am
by fido-x
Just had another look at the code in the checkout/order model and in the bank transfer module. Scrap what I told you before -- I got it wrong! I was looking at the wrong comment.

OK. In "catalog/model/checkout/order.php" replace the block of code I told you to insert at line 253, with:

Code: Select all

$template->data['comment'] = $comment; 
And, in "catalog/view/theme/default/template/mail/order.tpl", replace the code I gave you with:

Code: Select all

<?php if ($comment) { ?>
<p><?php echo $comment; ?></p>
<?php } ?>

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Fri Aug 05, 2011 3:50 am
by eddy
fido-x wrote:Just had another look at the code in the checkout/order model and in the bank transfer module. Scrap what I told you before -- I got it wrong! I was looking at the wrong comment.

OK. In "catalog/model/checkout/order.php" replace the block of code I told you to insert at line 253, with:

Code: Select all

$template->data['comment'] = $comment; 
And, in "catalog/view/theme/default/template/mail/order.tpl", replace the code I gave you with:

Code: Select all

<?php if ($comment) { ?>
<p><?php echo $comment; ?></p>
<?php } ?>
Yes, this works perfectly! Thank you!

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Tue Aug 09, 2011 4:53 am
by fsit
Thanks for the information, it solved this almost for me but maybe I lost something in the corrections or is my shop too customized but when I applied this fix, it overwrites the customer remarks in the e-mail.

So I added in catalog/model/checkout/order.php below:

Code: Select all

$template->data['comment'] = $order_info['comment'];
this new line:

Code: Select all

$template->data['comment1'] = $comment;  //extra
And in catalog/view/theme/default/template/mail/order.tpl above the $text_footer:

Code: Select all

 <?php if ($comment1) { ?>
<p><?php echo $comment1; ?></p>
<?php } ?>
Which solved my override in 1.5.0.5 with this extension: http://www.opencart.com/index.php?route ... order=DESC

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Tue Oct 25, 2011 4:41 pm
by Hanis
Hi

I did this solution but when i do testing email. The comment become like this

Bank Transfer Instructions Thank you for buying with us. Please transfer the total amount to the following bank account. Maybank Acc# :xxx CIMB Acc# :xxx Kindly inform us reference number after payment. Email to xxxx or SMS to xxxxxx Your order will not ship until we receive payment. Your order will not ship until we receive payment.

The comment do not have any line.

While it should be like this

Please transfer the total amount to the following bank account.

Maybank Acc# : xxxx
CIMB Acc# : xxxxx

Kindly inform us reference number after payment. Email to xxx or SMS to xxxx

Your order will not ship until we receive payment.

Please help

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Tue Nov 01, 2011 9:09 am
by Angeloop
Hanis wrote:Hi

I did this solution but when i do testing email. The comment become like this

Bank Transfer Instructions Thank you for buying with us. Please transfer the total amount to the following bank account. Maybank Acc# :xxx CIMB Acc# :xxx Kindly inform us reference number after payment. Email to xxxx or SMS to xxxxxx Your order will not ship until we receive payment. Your order will not ship until we receive payment.

The comment do not have any line.

While it should be like this

Please transfer the total amount to the following bank account.

Maybank Acc# : xxxx
CIMB Acc# : xxxxx

Kindly inform us reference number after payment. Email to xxx or SMS to xxxx

Your order will not ship until we receive payment.

Please help
Hi Hanis!

Were you able to solve this? I'm having the same problem thank you.

Regards.

Re: OC 1.5 BankTransfer details are not sent via email

Posted: Tue Nov 29, 2011 6:03 pm
by Ed73
@Hanis @Angeloop

Code: Select all

$template->data['comment'] = (nl2br($comment));