Author Topic: Turn off all lightboxes  (Read 4920 times)

PreFollower

  • Beginner
  • *
  • Posts: 3
Turn off all lightboxes
« on: June 11, 2012, 13:49:51 pm »
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

  • Jr. Member
  • **
  • Posts: 146
Re: Turn off all lightboxes
« Reply #1 on: June 11, 2012, 15:02:48 pm »
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.
Code: [Select]
echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',false,'class="modal"');
and change it with this one
Code: [Select]
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

  • Beginner
  • *
  • Posts: 3
Re: Turn off all lightboxes
« Reply #2 on: June 11, 2012, 15:06:30 pm »
Thanks, it solved first problem.

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

srajca

  • Jr. Member
  • **
  • Posts: 146
Re: Turn off all lightboxes
« Reply #3 on: June 11, 2012, 15:23:07 pm »
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
Code: [Select]
<?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

  • Beginner
  • *
  • Posts: 3
Re: Turn off all lightboxes
« Reply #4 on: June 11, 2012, 19:35:51 pm »
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

  • Beginner
  • *
  • Posts: 7
Re: Turn off all lightboxes
« Reply #5 on: July 23, 2012, 14:45:48 pm »
hello!
i am looking also for a function to change the big picture, when you click on a small one...

GomHang

  • Beginner
  • *
  • Posts: 2
Re: Turn off all lightboxes
« Reply #6 on: May 23, 2013, 18:28:02 pm »
thanks, I also have just solved this problem  :)

Studio47WebDesign

  • Beginner
  • *
  • Posts: 3
Re: Turn off all lightboxes
« Reply #7 on: July 16, 2014, 02:56:04 am »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28117
  • Always on vacation
    • Jenkin Hill Internet
Re: Turn off all lightboxes
« Reply #8 on: July 16, 2014, 10:44:34 am »
In VM2.6.6 - does this do what you want?
Configuration/Templates/Media Files Settings/Open additional images on main position
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.24 PHP 7.4.14