Not SEF link while I am using custom php product link in button? How to fix?

Started by kostianev, February 26, 2018, 00:46:54 AM

Previous topic - Next topic

kostianev

Dear, I made one Button which is More details about the product, which link to Product Details page from Category.
The link is working, bit in the Browser URL address bar is showing not SEF link like "category/product-details" it`s showing standart link "com_virtuemart&product..."

<?php echo $productItems->productTitle->link; ?>

I am using this command. Can someone help me to fix this issue?

Studio 42

Try using
<?php echo jRoute::_($productItems->productTitle->link); ?>
Note that link have to be a valid relative no sef url