Need full URL displayed in email notice to customer in Virtuemart (Joomla)

Hello,
An email goes out to customer and store admin when order is placed which has a hyperlink to the product on the website , but the link is broken because it only contains the relative url.   I need it to show the full URL so it's clickable from the email.  I have found the php file that needs to be changed which has this line:
 <?php echo JHTML::link($prow->url, $prow->product_name) . $prow->customfields; ?>
So i what i don't know is where it's pulling the url from and how to adjust it to show the full url.
Thanks
Heather
hthrpAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Try prepending JURI::root()

 <?php echo JURI::root().JHTML::link($prow->url, $prow->product_name) . $prow->customfields; ?>

Open in new window

0
hthrpAuthor Commented:
Thanks so much for your response.  That was pretty close, however, what it did was to put the root URL in front of the text that was hyperlinked.   So clicking on link in email ends up with the same result.  I need the full url as a link.  
What I got was this:  
 http://rooturl.com/<a href="/en/category/sub-category/product-name.html">Product Name</a>
but I need this:  
<a href="http://rooturl.com/en/category/sub-category/product-name.html">Product Name</a>
Thanks
0
hthrpAuthor Commented:
I had a hunch this was not too difficult, but I'm still hunting for a solution.   I just don't know php to fix it.    The original file the code is on can be found at components/com_virtuemart/views/cart/tmpl/default_pricelist.php  but it currently is loading from a custom override file in the template.    Really need a solution.   Willing to hire someone who can fix this for me.
Thanks
Heather
0
GaryCommented:
Documentation is seriously lacking

Either try
<?php echo JHTML::link(JURI::root() . $prow->url, $prow->product_name) . $prow->customfields; ?>

else
<a href="<?php echo JURI::root().$prow->url?>"><?php echo $prow->product_name?></a>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hthrpAuthor Commented:
Thanks so much for your help Gary, worked great.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.