News:

Looking for documentation? Take a look on our wiki

Main Menu

SEF product URL?

Started by EvanGR, September 12, 2018, 08:57:28 AM

Previous topic - Next topic

EvanGR

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


Ghost

JRoute::_($this->product2->canonical)