I am trying to get the canonical URL for a product, like so:
$productCanonicalUrl = JURI::root() . $this->product2->canonical;
It works, but I get the complex (non-SEF) URL structure: index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=543&virtuemart_category_id=42
How can I get the SEF version of that?
Note that I want to insert the SEF URL into my own html link element, and not use Joomla function to create the link for me.
Thanks
JRoute::_($this->product2->canonical)