Post by faizanyasn » Tue Jan 12, 2021 2:38 pm

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 %}

For further assistance with Opencart Development you can reach me at
asktofaizan@gmail.com | https://asktofaizan.com |


Newbie

Posts

Joined
Tue Jan 12, 2021 2:28 pm
Who is online

Users browsing this forum: Majestic-12 [Bot], nonnedelectari and 70 guests