P
P
powercoder2019-10-30 17:21:49
Joomla
powercoder, 2019-10-30 17:21:49

How to get Virtuemart product alias?

How to get virtuemart product alias via Jroute? For example, this is how a link to a product card is formed with the capture of the product ID:

$url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id); ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MKE, 2020-09-23
@MKE

It depends where - in which file ..
Try this:
echo $product->slug;
And this way you can see what is in the $product object:

echo '<pre>';
print_r($product);
echo '</pre>';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question