Hello.
There was a need to create a link to the parent product on the child product page.
I really hope for help
Old topic, but let me write back:
if product is parent, change "virtuemart_product_id" to "product_parent_id"
You can use the following codes on the product details page.
<?php
if (!empty($this->product->product_parent_id))
{
$model = VmModel::getModel('product');
$parentProduct = $model->getProduct($this->product->product_parent_id, true, true, true, 1);
if ($parentProduct->virtuemart_product_id > 0)
{
echo 'Go back to Parent Product: <a href="' . JRoute::_($parentProduct->link) . '">' . $parentProduct->product_name . '</a>';
}
}
?>