Thursday, January 26, 2012

3dCart Slideshow Issue Fixed

A few days ago I posted about an issue with a jQuery slideshow not working on the 3dCart product pages. Read the original post here.

While the slideshow had been working perfectly, suddenly the product pages were throwing a javascript error -- $("#slider") is null. I know just enough about javascripts to get myself in trouble, but did know that error signals a conflict with another script. So after much Googling and reading up on "jQuery conflicts", I finally found a quick and very easy fix.

If your slideshow is not working on your 3dCart product pages:

1. Open the frame.html file. (In your admin panel, go to Settings > Design > Themes & Styles. Click on the Edit Template (HTML) button.)

2. Click the Edit button next to frame.html. On the screen that appears, look for the following code:

$(window).load(function() {
     $('#slider').nivoSlider({

3. Replace the dollar sign with jQuery so that the coding looks like this:

jQuery(window).load(function() {
     jQuery('#slider').nivoSlider({

4. Save the page and clear the site cache. If you do not know how to clear the 3dCart cache, read our Help Center article.

Now when you view your site you should see the slideshow appear on all of your pages.

2 comments:

Terry said...

I'm attempting to install a jQuery cycle Slideshow. When I'm logged into the admin, the slide show works great. When I'm logged out or in another browser. It does not.

I would expect a conflict with the additional scripts running while logged in, but something else is going on when I"m logged out.

Any suggestions?

Karey Cummins said...

Hi Terry... If the script conflict fix didn't work, email me and send your URL. I'll see if I can spot anything.