Hello everyone,
For tracking purposes I would like to add the name of the referencing product to the related products url. How can I access the data of the parent element within related.php?
Thank you in advance.
Joomla 3.9.21, VM 3.6.10
$jinput = JFactory::getApplication()->input;
$virtuemart_product_id = $jinput->get('virtuemart_product_id');
$pM = VmModel->getModel('Product');
$ref_product = $pM::getProductSingle ($virtuemart_product_id, true,1,false,'', true, true);
echo $ref_product->product_name;
not tested
Great, it worked. Because the 'getProductSingle' method is not static, I had to make the following adjustment:
Instead of '$pM::getProductSingle' i used '$pM->getProductSingle'
ah yes --- edited