Post by mikrocica » Tue Dec 01, 2020 11:14 pm

Hi,
I was willing to edit reward points mail's twig. \admin\view\template\mail\reward.twig
Bold the {{ text_received }} for example
In cased like order_add.twig it is possible with a simple html code, but not in case of rewards mails.
Why is that?
Can I somehow edit it?
Thank you for any idea

Newbie

Posts

Joined
Tue Jun 02, 2015 3:30 pm

Post by OSWorX » Wed Dec 02, 2020 1:05 am

mikrocica wrote:
Tue Dec 01, 2020 11:14 pm
Hi,
I was willing to edit reward points mail's twig. \admin\view\template\mail\reward.twig
Bold the {{ text_received }} for example ..
.. simple html code ..
What exactly do you want to achieve?
And willing .. what have you changed?
And what do you understand under "simple html code"?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by sw!tch » Wed Dec 02, 2020 2:40 am

mikrocica wrote:
Tue Dec 01, 2020 11:14 pm
In cased like order_add.twig it is possible with a simple html code, but not in case of rewards mails.
Why is that?
Can I somehow edit it?
Because the view output is set as plain text whereas the order_add mail is set as html.
https://github.com/opencart/opencart/bl ... rd.php#L61

If you want html support, you would have to change the the reward event view output from $mail->setText to $mail->setHtml and then format the twig template in html.

Full Stack Web Developer :: Send a PM for Custom Work / Fast Support.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA
Who is online

Users browsing this forum: No registered users and 34 guests