is there any way to get the product details to open in a new window?
the code in the com_virtuemart/category/default.php is:
<p>
<?php // Product Details Button
echo JHTML::link ($product->link, JText::_ ('COM_VIRTUEMART_PRODUCT_DETAILS'), array('title' => $product->product_name, 'class' => 'product-details'));
?>
</p>
I think I saw a solution for this somewhere on forum. Could you try a search button?
Thanks Maxim
I have had a search of this site and also had a look in the Joomla! documentation, but I don't know how to achieve this.
The site uses a fancy pants filter system (custom filters) to select products, but has unpredictable results when the 'back to...' link or back browser button is used from a product page.
The easiest solution, we thought, would be to have the product detail page open in a fresh tab.
Quick View functionality - https://forum.virtuemart.net/index.php?topic=109953.msg368626
Very close to ready solution. Unfortunately some fix is necessary in add-to-cart process.
By the way some authors of custom VM themes made Quick View feature.
So it's possible to learn how they did that on their demo web sites.
Or just to buy their designs which are ready to use.
But, hey, there're 174 custom VM themes over Internet.
A lot of work to check them all one by one.
That's brilliant Maxim. I better get started then.
Here is the code I used and works great:
<p>
<?php //New Product details button -> open product details page in modal
$url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id . '&tmpl=component');
?>
<a class="product-details" href="<?php echo $product->link ?>" target="_blank"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS') ?></a>
</p>
Many thanks to Bytelord and Maxim
...and here is the line for the new browser window product link text:
<h2><a href="<?php /** Link the text in a new browser window*/ echo $product->link ?>" target="_blank"><?php echo $product->product_name;?></a></h2>