Hi, not critical, but would be nice if it's easy to modify.
My question is How to make url clickable inside comment in order history?
Example, a url that leads to the shipment tracking page.
So all I need is if the comment has a url, it can be clicked (by default, it's just text, not clickable). Pretty much like "automatically parse URLs".
For OC 1.5.4.1
Thanks
My question is How to make url clickable inside comment in order history?
Example, a url that leads to the shipment tracking page.
So all I need is if the comment has a url, it can be clicked (by default, it's just text, not clickable). Pretty much like "automatically parse URLs".
For OC 1.5.4.1
Thanks
My OC sites:
Top Choice Variety
Tiny World
You would need to add html_encode to it, but not sure where. There was a thread about doing this in attributes that might help you figure it out. Do a search.
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Hi, you might mean this thread?
http://forum.opencart.com/viewtopic.php?t=47053
It will work but if i type html code in the comment, customer will see the html code in their mail (if i choose to notify them).
But thanks for the idea, I will try to think of something.
http://forum.opencart.com/viewtopic.php?t=47053
It will work but if i type html code in the comment, customer will see the html code in their mail (if i choose to notify them).
But thanks for the idea, I will try to think of something.
My OC sites:
Top Choice Variety
Tiny World
Done.
This is my approach:
Any feedback is welcome.
This is my approach:
Code: Select all
<modification>
<id>Make URL clickable in order comment, tested oc 1.5.4.1</id>
<version>1.0.1</version>
<vqmver>2.3.0</vqmver>
<author>zekin</author>
<file name="catalog/controller/account/order.php">
<operation>
<search position="replace"><![CDATA[
'comment' => nl2br($result['comment'])
]]></search>
<add><![CDATA[
'comment' => nl2br(preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[A-Z0-9+&@#\/%=~_|]/i', '<a href="\0" target="_blank">\0</a>', $result['comment']))
]]></add>
</operation>
</file>
</modification>
My OC sites:
Top Choice Variety
Tiny World
Who is online
Users browsing this forum: Semrush [Bot] and 22 guests