News:

Support the VirtueMart project and become a member

Main Menu

Turn off all lightboxes

Started by PreFollower, June 11, 2012, 13:49:51 PM

Previous topic - Next topic

PreFollower

Hi.

Maybe someone think that all that lightboxes are great, but I think that if you click product image in category you want to see product page, not lightbox.
So, is there any way to:
1. Turn product images in category into simple links to product page
2. Turn off lightbox for additional images on product page, and replace big image with additional instead?

I hope there are just some checkboxes somewhere, but I expect to rip apart templates and use javascript.

srajca

I just did that today for my template ;)
Go to templates/YOUR TEMPLATE/html/com_virtuemart/category/default.php and find this code - it should be around line 220.
echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',false,'class="modal"');

and change it with this one
echo JHTML::link ( JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ),
            $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',false) );

This will remove the lightbox and when you click on the image it will redirect you to your product description page.
Hope it helps

PreFollower

Thanks, it solved first problem.

Now what about second? I still need to replace big image on click.

srajca

to change big image to small go to templates/YOUR TEMPLATE/html/com_virtuemart/productdetails/default_images.php nad search for the following at about line 26
<?php echo $this->product->images[0]->displayMediaFull('class="medium-image" id="medium-image"'false"class='modal'"true); ?>
and just change displayMediaFull with displayMediaThumb that is a couple of lines lover. I am not 100% sure but this should do the trick, and in order to turn of the lightbox I think you have to set some of the parameters that are true to false. Hope it helps

PreFollower

This will make one more small image which is similar to first additional. But I need big image to change when you click on small.

So if you have, for example, two images for product. When you open product page there will be one big image and two small. If you click small, lightbox will show up. But I want big image to change into clicked instead of this.

nitg

hello!
i am looking also for a function to change the big picture, when you click on a small one...

GomHang

thanks, I also have just solved this problem  :)

Studio47WebDesign

How did you fix this? I want to disable Lightbox in Product Display and just have all the thumbnails open in the large product image place. Please help.

jenkinhill

In VM2.6.6 - does this do what you want?
Configuration/Templates/Media Files Settings/Open additional images on main position
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum