Post by MrFerriero » Sat Oct 27, 2018 12:00 am

Hello! Is it possible to add html to order comments? How can I do that? I try to put in HTML code but it doesn't work. In particular I'm looking to add links in order comments.

Thanks!

New member

Posts

Joined
Mon Jun 01, 2015 1:14 am


Post by rjcalifornia » Sat Oct 27, 2018 9:49 am

MrFerriero wrote:
Sat Oct 27, 2018 12:00 am
Hello! Is it possible to add html to order comments? How can I do that? I try to put in HTML code but it doesn't work. In particular I'm looking to add links in order comments.

Thanks!
How are you planning to add those links? Like, do you want users to put a link in the comment box?

Image
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by thekrotek » Sat Oct 27, 2018 10:14 am

Nobody here understands what does "doesn't work" mean. Always describe the issue in detail.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by MrFerriero » Sun Feb 03, 2019 11:20 am

Sorry, what I mean by "Doesn't Work" is that I put in an HTML code on an order comment on my admin side and on the customer side you see the html code not what I wanted.

So, I put <a href="link">LINK</a> and I wanted my customers to see on their dashboard the link not the html code.
Does that help? Sorry :)

New member

Posts

Joined
Mon Jun 01, 2015 1:14 am


Post by OSWorX » Sun Feb 03, 2019 7:42 pm

Comments added to orders in the backend are plain text only.
If you want to have them as HTML, you have to convert the message like:

Code: Select all

$comment = html_entity_decode( nl2br( $comment ) , ENT_QUOTES, 'UTF-8' );
And send the message (mail) as html.

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 KandC » Sun Aug 13, 2023 4:01 am

OSWorX wrote:
Sun Feb 03, 2019 7:42 pm
Comments added to orders in the backend are plain text only.
If you want to have them as HTML, you have to convert the message like:

Code: Select all

$comment = html_entity_decode( nl2br( $comment ) , ENT_QUOTES, 'UTF-8' );
And send the message (mail) as html.
Where do you make this change? What module? I'm on OpenCart version 3.0.3.8

Active Member

Posts

Joined
Sun Jun 11, 2023 7:14 am

Post by paulfeakins » Mon Aug 14, 2023 7:39 pm

KandC wrote:
Sun Aug 13, 2023 4:01 am
Where do you make this change? What module? I'm on OpenCart version 3.0.3.8
Probably the controller for the customer account page.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: Amazon [Bot], Google [Bot] and 435 guests