News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Open product in new page from category page

Started by dfeg, June 23, 2013, 16:40:49 PM

Previous topic - Next topic

dfeg

Hi
I@m looking for links from the category page to the product details pages to open in a new window/tab. i was able to do this in VM1 by using <?php echo $product_flypage ?> in a link with target="_blank" but the links seem to be build differently in vm2 and i'm struggling to figure out how to do this.
Thanks

dfeg

I've found the answer myself. staring at me

<a href="<?php echo $product->link ?>" target="_blank" rel="nofollow">

dfeg

found an even neater way of doing it just add  'target' => '_blank' to the array at the end of the link so for the product details buttons

<p>
               <?php // Product Details Button
               echo JHTML::link($product->link, JText::_('COM_VIRTUEMART_PRODUCT_DETAILS'), array('title' => $product->product_name,'class' => 'product-details', 'target' => '_blank'));
               ?>
               </p>