Page 1 of 1

[SOLVED] User comment not in html email order confirmation sent to user OC 3.x

Posted: Tue Jan 12, 2021 2:38 pm
by faizanyasn
I figured it out, this is how you can do HTML based Order emails from admin in OC 3.x

catalog/controller/mail/order.php

Modify Line ~ 307 to below

Code: Select all

$data['comment'] = html_entity_decode($comment);
and line ~329 to

Code: Select all

$mail->setHtml($this->load->view('mail/order_edit', $data));
then simply Update the view
catalog/view/theme/default/template/mail/order_edit.twig

to

Code: Select all

{{ text_order_id }}&nbsp;{{ order_id }}<br>
{{ text_date_added }}&nbsp;{{ date_added }}<br>
<br>
{{ text_order_status }}:  <b>{{ order_status }}</b>
<br>
{% if link %}
{{ text_link }}
<br>
{{ link }}
<br>
{% endif %}
{% if comment %}

{{ text_comment }}
<br>
{{ comment }}
<br>
<br>
{{ text_footer }}
{% else %} 
{{ text_footer }}
{% endif %}