VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: colmagoo on March 16, 2014, 18:46:02 PM

Title: Click on category list image to open fancybox image
Post by: colmagoo on March 16, 2014, 18:46:02 PM
In a previous VM2.0.6 project, on the product listing page, clicking on the product image by default opened a lightbox / fancybox version. I am now using the latest version of VM 2.0.26d on a new project and can no longer do this - it eaither just links to the product detail page or opnes the large image in a new window. Has anyone worked out the code changes required to add the fancybox effect so I can insert the new file as VM category overriide?

Thanks a lot

Colin
Title: Re: Click on category list image to open fancybox image
Post by: K&K media production on March 16, 2014, 22:56:35 PM
Compare the differenes in the category view between the old and current vm version. Create a template override and add the variant with fancybox to the image. You can download all vm versions here: http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: Click on category list image to open fancybox image
Post by: colmagoo on March 16, 2014, 23:26:27 PM
Thanks for the reply - i did swap the category default.php file from the old working version into my override folder but it made no difference, so I guess I'm missing something - possibly other files which need to be rolled back. Unfortunately I'm by no means a php expert but thought there would be a good chance that someone has come up against this problem and knows the answer. Certainly other threads have touched on it but at this point I can't find or work out a definitive answer,
Title: Re: Click on PRODUCT list image to open fancybox image
Post by: colmagoo on March 16, 2014, 23:29:03 PM
my bad - subject should probably have read 'Click on PRODUCT list image to open fancybox image' - although the page is a VM Category menu type.
Title: Re: Click on category list image to open fancybox image
Post by: K&K media production on March 23, 2014, 00:29:47 AM
try to replace


    <a title="<?php echo $product->product_name ?>" rel="vm-additional-images" href="<?php echo $product->link?>">
<?php
echo $product->images[0]->displayMediaThumb('class="browseProductImage"'true);
?>

</a>


with


<?php /** @todo make image popup */
echo $product->images[0]->displayMediaThumb ('class="browseProductImage" border="0" title="' $product->product_name '" 'TRUE'class="modal"');
?>

Title: Re: Click on category list image to open fancybox image
Post by: colmagoo on March 23, 2014, 15:00:58 PM
awesome kkmediaproduction - this works !

Many thanks
Title: Re: Click on category list image to open fancybox image
Post by: netajour on March 05, 2015, 16:18:59 PM
Hello
On year later
I have the same proble but solution given not working for me.
Is it because I use J3 and VM3 ?

Thank you for reply