VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: tom5436 on January 07, 2014, 20:22:23 PM

Title: Image thumbnails in product description not working
Post by: tom5436 on January 07, 2014, 20:22:23 PM
Not sure what happened, but the image thumbnails on the product description pages no longer change the main image. Any one ever have this issue before? Or know how to fix this?

Thanks,

Tom

Virtuemart Version 2.0.26

http://winecountrycraftsman.net/product/kitchen-bar-office/floating-wine-barrel-shelfwcc
Title: Re: Image thumbnails in product description not working
Post by: jenkinhill on January 07, 2014, 20:29:42 PM
http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Image thumbnails in product description not working
Post by: tom5436 on January 08, 2014, 19:21:11 PM
anybody ever have this issue??
Title: Re: Image thumbnails in product description not working
Post by: jenkinhill on January 08, 2014, 20:22:05 PM
Yup. It is a JavaScript conflict. You correctly load VirtueMart's jQuery version 1.6.4 but after that your template loads an older version, jQ1.4.4 preventing the fancybox script from working.  Probably all you need to do is stop the template version loading.

http://forum.virtuemart.net/index.php?topic=119638.0
Title: Re: Image thumbnails in product description not working
Post by: jjk on January 08, 2014, 20:36:27 PM
Looks to me like a jQuery conflict. Your template loads the very old jQuery version 1.4.4 from year 2010. This probably is responsible for this error:

TypeError: jQuery(...).fancybox is not a function
http://winecountrycraftsman.net/product/kitchen-bar-office/floating-wine-barrel-shelfwcc
Line 69

You should disable this old version of jQuery. Make shure that only one version of jQuery is loaded. You can see such things if you use the Firefox browser with 'Firebug' plugin installed.

Also it seems like you deleted the Seo Suffix in VM2 Configuration > SEO tab. You can enter almost anything you like, e.g. -htm, -html, -art, etc. Default is -detail.
If you leave that empty, the router (which produces the SEF urls) will not work in certain cirumstances.
Title: Re: Image thumbnails in product description not working
Post by: tom5436 on January 10, 2014, 18:26:05 PM
Is this the code that load the old jquery in my template?

<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/js/jquery.js"></script>
  <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/js/jquery.faded.js"></script>   
<script type="text/javascript"> 
var $j = jQuery.noConflict();
    $j(function(){
      $j("#faded").faded({
        speed: 700,
        crossfade: true,
        autoplay: 4000,
        autopagination:true
      });
    });
</script>


I commented it out, but still had issues.
Title: Re: Image thumbnails in product description not working
Post by: jenkinhill on January 10, 2014, 18:30:11 PM
You should only comment out the first line there. And hope that the fader text will work using the VM jQ version which is already loaded.
Title: Re: Image thumbnails in product description not working
Post by: tom5436 on January 10, 2014, 20:13:24 PM
Thank you! That worked. So simple and I never would have figured that out on my own. Thanks again.
Title: Re: Image thumbnails in product description not working
Post by: tom5436 on January 10, 2014, 20:39:47 PM
Commenting that line of code out made it so my slide show no longer works. Should load a newer version of jquery in my template instead of commenting it out all together
Title: Re: Image thumbnails in product description not working
Post by: jenkinhill on January 10, 2014, 20:49:11 PM
The slide show is very old code so was using a very old jQuery version. Now it is exposed to a later version with VM and does not work, so the chances of a newer one still (you can go to jQ1.7.1) is not likely to help. Maybe replace the slide show with something more recent - or only use it on a non-VM page.