VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: bardius on January 02, 2012, 12:36:31 PM

Title: Category browse page product thumbnail linking to product details page
Post by: bardius on January 02, 2012, 12:36:31 PM
If you want to link to the details page instead of a modal window popup of a larger image for each product listen in your category browse page, simply replace

echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',true,'class="modal"');

with:

echo JHTML::link($product->link, $product->images[0]->displayMediaThumb('',false), 'title="'.$product->product_name.'"');

in your category browse template file.
Title: Re: Category browse page product thumbnail linking to product details page
Post by: maks on January 02, 2012, 18:29:17 PM
Try that, but ended with no image at all.
Title: Re: Category browse page product thumbnail linking to product details page
Post by: bardius on January 03, 2012, 10:09:26 AM
Please do

echo on the code above if you did not.


echo JHTML::link($product->link, $product->images[0]->displayMediaThumb('',false), 'title="'.$product->product_name.'"');
Title: Re: Category browse page product thumbnail linking to product details page
Post by: spottedsparrow on January 10, 2012, 20:19:18 PM
Thank you! Was just trying to work that out.