I am trying to convert URLs on the front end to clickable links. The functionality is needed specifically for the order info page, where the customer can simply click on the Order Tracking URL that is entered in the comments to track order, rather than having to copy and paste the URL to open it. I found this PHP code to accomplish this-
function make_urls_into_links($plain_text) {
return preg_replace(
'@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-~]*(\?\S+)?)?)?)@',
'<a href="$1">$1</a>', $plain_text);
}
1. Where to put this code?
2. Does it need modification to work with Opencart 1.5.6.4?
3. Is there any way to run this function on the order details page only?
Thanks in anticipation
