Page 1 of 2

Payment comments in email

Posted: Tue Jun 15, 2010 6:23 pm
by tdweb
Hi

I have a little suggestion about the presentation on payment comments:

For example if the client chose bank transfer as payment option, the information about the bank account only apear in the confirmation page, before submitting the order. It is not passed to the email message and that is an important issue.

I know that the information is presented in the client account history, but I think it was better if that info appear also in email message.

Other think. Like cheque payment option the payment comments shouldn't be presented in the confirmation page. That can induce the client to think that the order have been accepted, and he could forget to click the confirm button.

(Sorry for my English)

Re: Payment comments in email

Posted: Tue Jun 15, 2010 9:42 pm
by Qphoria
in 1.4.8 comments were fixed for emails

Re: Payment comments in email

Posted: Tue Jun 15, 2010 10:15 pm
by tdweb
humm

I have upgrade from 1.4.7. but the only comments included in the email are just de comments fielded in the comment text box (by the client) the coments about the Bank Transfer payment ( Bank Transfer Instructions fielded in backoffice) are presented in the confirm page and in the order history (as history entry not as comment), but they are not being included in the email message.

Can you confirm this? Or is some problem whit my upgrade.

Re: Payment comments in email

Posted: Tue Jun 15, 2010 10:25 pm
by Qphoria
oh .. you mean you want the bank transfer data included in the email... I've never used it but I guess it has its own box. That can be arranged

Re: Payment comments in email

Posted: Tue Jun 15, 2010 11:13 pm
by tdweb
Yes that's it. I well wait for any tip. I'm developing a new module based on "pay by cheque" and need that the information about payment is passed to the email.

Thank's for your fast reply.

Re: Payment comments in email

Posted: Tue Jun 15, 2010 11:19 pm
by Qphoria
Try this....

1. EDIT: catalog/model/checkout/order.php

2. FIND at row 176:

Code: Select all

$template->data['comment'] = $order_query->row['comment']; 
3. REPLACE WITH:

Code: Select all

$template->data['comment'] = ($order_query->row['comment'] . '<br /><br />' . nl2br($comment)); 

Re: Payment comments in email

Posted: Tue Jun 15, 2010 11:31 pm
by i2Paq
Qphoria wrote:oh .. you mean you want the bank transfer data included in the email... I've never used it but I guess it has its own box. That can be arranged
That would be a good change as a lot of people still pay by bank transfer and forget to wright down the info displayed on the site.
Having it in the e-mail will solve a lot of headaches ;)

Re: Payment comments in email

Posted: Tue Jun 15, 2010 11:36 pm
by Qphoria
Well it actually "was" in the old text based email. Looks like it was left out in the html email version.

Re: Payment comments in email

Posted: Wed Jun 16, 2010 12:06 am
by tdweb
it work, but it's not assuming line brakes (<br> tags). Can you helpe me?

Re: Payment comments in email

Posted: Wed Jun 16, 2010 12:16 am
by tdweb
I do not explain correctly, in admin there is a text field for Bank "Transfer Instructions:" it's not html it's a simple text box. I wright text in 3 diferent lines but in the email it put all together in just one line. I'm not using <br> tags.

Re: Payment comments in email

Posted: Wed Jun 16, 2010 1:14 am
by i2Paq
Qphoria wrote:Well it actually "was" in the old text based email. Looks like it was left out in the html email version.
Will you add at back?

Re: Payment comments in email

Posted: Wed Jun 16, 2010 1:55 am
by Qphoria
I just did above

Re: Payment comments in email

Posted: Wed Jun 16, 2010 1:58 am
by Qphoria
tdweb wrote:I do not explain correctly, in admin there is a text field for Bank "Transfer Instructions:" it's not html it's a simple text box. I wright text in 3 diferent lines but in the email it put all together in just one line. I'm not using <br> tags.
I updated it above... try that new line with nl2br() around it

Re: Payment comments in email

Posted: Wed Jun 16, 2010 2:06 am
by i2Paq
Qphoria wrote:I just did above
I mean, in the OpenCart core.

Re: Payment comments in email

Posted: Wed Jun 16, 2010 2:27 am
by Qphoria
well as soon as you freaks test out my change, I will put it in :)
Less questions.. more testin's!

Re: Payment comments in email

Posted: Wed Jun 16, 2010 3:16 am
by i2Paq
Qphoria wrote:well as soon as you freaks test out my change, I will put it in :)
Less questions.. more testin's!
Testing, testing, testing.

Succes!

Re: Payment comments in email

Posted: Wed Jun 16, 2010 3:03 pm
by tdweb
Today I have no time. I will try later. Thank you.

Re: Payment comments in email

Posted: Wed Jul 21, 2010 6:05 am
by Joxe
Thanks!!!
Just what I needed!

ps: my code was in line 170, not 176 ;)

Re: Payment comments in email

Posted: Thu Feb 03, 2011 3:56 pm
by blsuk
Hey guys!

I have read the above and still have an issue with the customer comments from an order being tranferred to email when using 'registered user'. It works perfectly on guest checkout.

I have tried to fathom it out but I'm not confident on which part needs to be changed, i have compared the guest_step_3.php and confirm.php files and have also looked at the suggestions above in order.php but I'm pretty sure the problem lies with the confirm.php file or confirm.tpl.

Any help would be massively appreciated :O))

Re: Payment comments in email

Posted: Tue Sep 06, 2011 10:32 pm
by andrixx
this line is completely removed in the Opencart 1.5.1.1 core.
$template->data['comment'] = ($order_query->row['comment'] . '<br /><br />' . nl2br($comment));

if this was supposed to be added to the core, then it's not there.

I am using it now and it works. It is very important that the costumer gets this payment information in their email. So I recommend it's in the core.

Maybe people don't use bank-transfer, I translated my module to work as BankGiro.