VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: skhn123 on April 11, 2014, 15:40:51 PM

Title: How to next and prev button in product image in lightbox
Post by: skhn123 on April 11, 2014, 15:40:51 PM
Hello Experts!!

I been searching for a solution to display navigation button in fancybox so when image open on fancybox it display next & prev button for other images and i found this thread http://forum.virtuemart.net/index.php?topic=97365.0

but it's not working or maybe i am unable to use it in right way. And also i dont want much just a simple next prev button when the lightbox appear. i have seen the buttons they are already there but they are set as display none by default and even if i make it display block it does nothing.

i am using joomla 2.5.17 and VM 2.0.26d

please someone help me.
Title: Re: How to next and prev button in product image in lightbox
Post by: jenkinhill on April 11, 2014, 16:18:41 PM
See http://forum.virtuemart.net/index.php?topic=121856.msg416077#msg416077
Title: Re: How to next and prev button in product image in lightbox
Post by: skhn123 on April 12, 2014, 07:54:11 AM
Hello jenkinhill.

I tried your solution but no luck, it still not showing buttons. there is one thing i would like to mention that i am already using an override so my default.php for product detail page has this code for image:
<div class="width46 floatleft">

<?php if (!empty($this->product->images)) {

$image $this->product->images[0];

?>


<div class="main-image">
                        <?php echo $image->displayMediaFull("class=gallary",true,"rel='vm-additional-images'"); ?>
<div class="clear"></div>
</div>
<?php
$count_images count ($this->product->images);

if ($count_images 1) {

?>


    <div class="additional-images">

<?php

for ($i 0$i $count_images$i++) {

$image $this->product->images[$i];

?>


            <?php

                echo $image->displayMediaFull('class="product-image" style="cursor: pointer"',false,"");

            ?>


<?php

}

?>


        <div class="clear"></div>

    </div>

<?php

}

?>


</div>


can you tell me by looking at my code if is there any other way. Thanks
Title: Re: How to next and prev button in product image in lightbox
Post by: skhn123 on April 12, 2014, 08:03:01 AM
I am sorry jenkinhill i was using your code in wrong place (in main image) but now its working when i replace it with addition image code but there is just one problem as it;s been already mention in http://forum.virtuemart.net/index.php?topic=97365.0
my first image is showing twice in lightbox.

any help in this regards
Thanks.