Cyberek wrote:I can't reproduce the issue on my test machine... Could you please describe how (beside adding related products to a single product) have you enabled related products section?
Cyberek wrote:One more thing that you could verify - please change template back to Beeze or Protostar and let me know if related products still opens in new tab/window.
echo JHtml::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id), $thumb . $related->product_name, array('title' => $related->product_name,'target'=>'_blank'));
echo JHtml::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id), $thumb . $related->product_name, array('title' => $related->product_name,'target'=>'_self'));
sysman wrote:I had a similar problem with Storefront template v.3.18.1 and VirtueMart 3.0.10. I resolved by editing "/components/com_virtuemart/sublayouts/related.php". Look for 'target'=>'_blank' and change to 'target'=>'_self'.
ORIGINAL CODE:
- Code: Select all
echo JHtml::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id), $thumb . $related->product_name, array('title' => $related->product_name,'target'=>'_blank'));
CHANGED AS FOLLOWS:
- Code: Select all
echo JHtml::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id), $thumb . $related->product_name, array('title' => $related->product_name,'target'=>'_self'));
This worked for me but not sure if there is a better way to do this e.g. in overrides?