Post by bryond » Mon May 15, 2017 9:15 pm

Version 2.0.3.1

Although my customers enter requested details on separate lines of the Payment Methods comments field in the Checkout, those details appear as a single line in the Instructions box of the new order email I receive.

Can I modify the code so the new order email shows the details on separate lines just as the customer has entered them in the Checkout?

Thanks in anticipation of any suggestions.

Newbie

Posts

Joined
Mon May 15, 2017 9:05 pm

Post by chrisranjana.com » Fri May 19, 2017 6:45 pm

bryond wrote:
Mon May 15, 2017 9:15 pm
...
Can I modify the code so the new order email shows the details on separate lines just as the customer has entered them in the Checkout?

....
A quick and dirty fix would be to change somewhere near line 48 in the file
/catalog/view/theme/default/template/mail/order.tpl

from

<?php echo $comment; ?>

to

<?php echo nl2br($comment); ?>

Chris, Opencart Developers and Programmers,
Opencart Developers Opencart Programmers
https://www.chrisranjana.com


User avatar
Active Member

Posts

Joined
Thu Feb 26, 2009 2:23 am
Location - chennai, India

Post by bryond » Fri May 19, 2017 9:07 pm

Hi Chris,

Thanks for the suggestion.

May be "quick and dirty", but works perfectly for me.

Thanks,

Bryon

Newbie

Posts

Joined
Mon May 15, 2017 9:05 pm
Who is online

Users browsing this forum: No registered users and 134 guests