VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: croppertiger on November 02, 2012, 17:34:55 PM

Title: Adding "Click for Bigger" on Main Product Image
Post by: croppertiger on November 02, 2012, 17:34:55 PM
Hi,

I have added the following to vmsite-ltr.css to ensure uploaded images get resized for the main product pages:

.medium-image {
            width:350px;
        }

This works great, however I would like it so that on the main product page, people can either click the image and the full-size image loads, such as on the search page when you click the thumbnail

So that this effect also happens when you click on the image on the main page:


Any help would be appreciated.

Regards,

Cropper
Title: Re: Adding "Click for Bigger" on Main Product Image
Post by: bytelord on November 02, 2012, 17:38:46 PM
Hello,

http://forum.virtuemart.net/index.php?topic=98647.0

Title: Re: Adding "Click for Bigger" on Main Product Image
Post by: croppertiger on November 03, 2012, 12:15:02 PM
To ensure the main product image shows at a decent size, and goes to a larger image upon click on it (or the thumbs on the main page) this code did the trick:

<?php echo $this->product->images[0]->displayMediaFull('class="medium-image"',true,"class='modal'"); ?>

(http://i.imgur.com/89Eaa.jpg)

Thanks for the help! Keep up the great work on this component!