VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: snewpers on December 27, 2011, 22:11:23 PM

Title: lightbox not linking to next/previous
Post by: snewpers on December 27, 2011, 22:11:23 PM
Not sure if this is the right forum, but in VM1, when you were on the product-detail page with multiple images, you could click one and the lightbox would open. Clicking left or right would show the previous or next image in that sequence without closing the lightbox.

any idea on how to get that working again? It only shows one at a time now.

Thanks!
Title: Re: lightbox not linking to next/previous
Post by: dboror on January 04, 2012, 08:59:07 AM
I install Widgetkit (yootheme) and modify this in \productdetails\:

<?php // Product Main Image
if (!empty($this->product->images[0])) { ?>

<div class="main-image">
<?php echo $this->product->images[0]->displayMediaFull('class="product-image"',false,"class='modal'",true); ?>
</div>
<?php // Product Main Image END ?>

<?php // Showing The Additional Images
if(!empty($this->product->images) && count($this->product->images)>1) { ?>

<div class="additional-images">
<?php // List all Images
foreach ($this->product->images as $image) {
echo $image->displayMediaThumb('class="product-image"',true,'class="modal"',true,true); //'class="modal"'
?>

</div>
<?php // Showing The Additional Images END ?>


to this:
<?php // Product Main Image
if (!empty($this->product->images[0])) { ?>

<div class="main-image">
<?php echo $this->product->images[0]->displayMediaFull('class="product-image"',false,"class='modal'",true); ?>
</div>
<?php // Product Main Image END ?>

<?php // Showing The Additional Images
if(!empty($this->product->images) && count($this->product->images)>=1) { ?>

<div class="additional-images">
<?php // List all Images

            foreach (
$this->product->images as $image) {
                
echo $image->displayMediaThumb('class="product-image"',true,"data-lightbox=\"group:".$this->product->virtuemart_product_id.";transitionIn:fade;titlePosition:over;\"",true,true); //'class="modal"'
    
                
            } 
?>

</div>
<?php // Showing The Additional Images END ?>
Title: Re: lightbox not linking to next/previous
Post by: 552288 on January 04, 2012, 13:05:23 PM
very nice, but Widgetkit is not for free, its posssible to realize this with other Plugins, Image-Sizer or so?

Greetings .....
Title: Re: lightbox not linking to next/previous
Post by: dboror on January 04, 2012, 16:55:04 PM
Use http://www.yireo.com/software/joomla-extensions/fancybox

demo
http://fancybox.net/home
Title: Re: lightbox not linking to next/previous
Post by: 552288 on January 04, 2012, 18:19:48 PM
thanks for reply, i try it............

will not work for me, Images are open in extern Window?

Joomla Plugins are enabled, hmm?

it´s possible you take a look?  http://creative-karat.de/index.php/shop/arbeitsschuhe/s3-schnuerstiefel-wedel-nuovo-mit-ueberkappe-detail

Greetings Ray
Title: Re: lightbox not linking to next/previous
Post by: dboror on January 13, 2012, 01:41:35 AM
Download the version Lite of Widget kit

http://www.yootheme.com/widgetkit/downloads/download?layout=single
Title: Re: lightbox not linking to next/previous
Post by: 552288 on January 15, 2012, 05:15:07 AM
Nice, its work, THX!  ;)
Title: Re: lightbox not linking to next/previous
Post by: lt635 on January 30, 2012, 00:59:43 AM
Thanks dboror, that works well!

Regards
Lene
Title: Re: lightbox not linking to next/previous
Post by: kaleske on January 30, 2012, 11:56:52 AM
Thank you very much ;)
Title: Re: lightbox not linking to next/previous
Post by: BITRU on January 31, 2012, 12:18:13 PM
dboror THANK YOU!
would love to see more yootheme implementatios.
Title: Re: lightbox not linking to next/previous
Post by: JdKock on February 11, 2012, 18:03:42 PM
dboror, can the lite version also be used for Joomla 1.7.3 ?
So can i download the Lite Joomla 2.5 Extension.
Title: Re: lightbox not linking to next/previous
Post by: rupesh on April 05, 2012, 09:33:12 AM
Quote from: 552288 on January 15, 2012, 05:15:07 AM
Nice, its work, THX!  ;)

Can u please tell me how to use this plugin on product details page so that lightbox must show pre and next button!
Title: Re: lightbox not linking to next/previous
Post by: BITRU on April 08, 2012, 01:12:45 AM
Quote<?php // Product Main Image
      if (!empty($this->product->images[0])) { ?>
         <div class="main-image">
         <?php
         echo $this->product->images[0]->displayMediaFull('class="product-image"',true,"data-lightbox=\"group:".$this->product->virtuemart_product_id.";transitionIn:fade;titlePosition:none;\"",true,true); ?>
         </div>
      <?php } // Product Main Image END ?>

      <?php // Showing The Additional Images
      if(!empty($this->product->images) && count($this->product->images)>=1) { ?>
         <div class="additional-images">
         <?php // List all Images

            foreach ($this->product->images as $image) {

            echo $image->displayMediaThumb('class="product-image"',true,"data-lightbox=\"group:".$this->product->virtuemart_product_id.";transitionIn:fade;titlePosition:none;\"",true,true); //'class="modal"'

            } ?>

I have main pictures showed twice in Lightbox if i click on main image. how can i fix it.
Title: Re: lightbox not linking to next/previous
Post by: rzrz on August 08, 2012, 07:30:38 AM
Quote from: BITRU on April 08, 2012, 01:12:45 AM
Quote<?php // Product Main Image
      if (!empty($this->product->images[0])) { ?>
         <div class="main-image">
         <?php
         echo $this->product->images[0]->displayMediaFull('class="product-image"',true,"data-lightbox=\"group:".$this->product->virtuemart_product_id.";transitionIn:fade;titlePosition:none;\"",true,true); ?>
         </div>
      <?php } // Product Main Image END ?>

      <?php // Showing The Additional Images
      if(!empty($this->product->images) && count($this->product->images)>=1) { ?>
         <div class="additional-images">
         <?php // List all Images

            foreach ($this->product->images as $image) {

            echo $image->displayMediaThumb('class="product-image"',true,"data-lightbox=\"group:".$this->product->virtuemart_product_id.";transitionIn:fade;titlePosition:none;\"",true,true); //'class="modal"'

            } ?>

I have main pictures showed twice in Lightbox if i click on main image. how can i fix it.

Me too facing the same issue, i am wondering how to solve this??
Title: Re: lightbox not linking to next/previous
Post by: megatronx64 on September 07, 2012, 23:17:25 PM
dboror first post, worked for me!

modifying the file located at:
components / com_virtuemart / views / ProductDetails / tmpl / default_images.php

VM 2.0.10 + Joomla 2.5.6

Thank you! ;D
Title: Re: lightbox not linking to next/previous
Post by: rzrz on October 07, 2012, 08:49:39 AM
Quote from: megatronx64 on September 07, 2012, 23:17:25 PM
dboror first post, worked for me!

modifying the file located at:
components / com_virtuemart / views / ProductDetails / tmpl / default_images.php

VM 2.0.10 + Joomla 2.5.6

Thank you! ;D

This works for me too, thanks!
Title: Re: lightbox not linking to next/previous
Post by: gryphan on November 08, 2012, 21:17:49 PM
it works, but main image - show twice, someone fix this ? please help !
Title: Re: lightbox not linking to next/previous
Post by: BjornOnPole on July 29, 2013, 10:02:35 AM
Quote from: gryphan on November 08, 2012, 21:17:49 PM
it works, but main image - show twice, someone fix this ? please help !
I know this thread is old, but it's one of the first hits in Google when you search for this option in VirtueMart, so I'm still going to post it:
My solution is to add the following to the productdetails default.php, right before the thumbnails are placed:

unset($this->product->images[0]);

This removes the first thumbnail, so it won't show twice.
Title: Re: lightbox not linking to next/previous
Post by: Ninjab on August 12, 2013, 15:49:00 PM
Do you or anyone know how to get Yootheme's Widhetkit slideshow galleries to trigger in fields other than the product description? I am trying to replace VM's image gallery with their Slideshow instead. Thanks.
Title: Re: lightbox not linking to next/previous
Post by: Maxim Pishnyak on August 12, 2013, 17:13:27 PM
You need to ask such question at Yootheme or search in their docs: "Is it possible to trigger widgetkit as system plugin?"

Is this post wasn't helpful for you
Quote from: dboror on January 04, 2012, 08:59:07 AM
I install Widgetkit (yootheme) and modify this in \productdetails\:
...
?