Images work off-line but not on-line

Display several small images against a main product. Clicking these images swaps the main product image.
Post Reply
Rob
Posts: 3
Joined: Thu Sep 17, 2015 5:44 pm

Images work off-line but not on-line

Post by Rob »

I recently updated Sellerdeck 2013 to version 12.0.6 due to an upgrade required by Sage Pay. This has stopped Multi Product Images from working as designed which was as mouseover popup images. Strangely, they still work in Sellerdeck itself, and in an offline preview in any browser.

I have checked that all the right files are in the site folder.

This is the page that doesn't work:

http://www.plantersparadise.co.uk/site/ ... nters.html

and this is an older version which shows how it was working:

http://www.plantersparadise.co.uk/site/ ... nters.html

This is a responsive site and I have set Multi Product Images to replace the main photo if on a screen under 767 pixels wide. Strangely, this still works fine. You can see this by narrowing a browser window.

If anyone was has any ideas on what might be happening here, I would be very grateful - I've spent hours trying to work it out and I've run out of ideas.
norman
Site Admin
Posts: 1248
Joined: Sat Feb 07, 2004 9:55 pm

Re: Images work off-line but not on-line

Post by norman »

Multi Product Images uses jQuery and something is preventing its:

$(document).ready(function(){ ...... })

from running.

Looking at your faulty site, I see that jQuery is being loaded twice and so is Multi Product Images Setup.

Remove the line that loads jQuery v1.10.2 and remove the extra Multi Product Images Setup line (there should only be one instance and that should be near the bottom of Standard JavaScript header functions).

If fixing these doesn't help it will at least have cleaned up the code and help with future debugging.
Norman
Rob
Posts: 3
Joined: Thu Sep 17, 2015 5:44 pm

Re: Images work off-line but not on-line

Post by Rob »

Many thanks for your reply, and apologies for my late response.

I have removed the line that loads jQuery v1.10.2 and the extra Multi Product Images Setup line. Whilst this didn't solve the problem, it tidies things up so thank you for that.

What does solve the problem is removing:

AddEvent(window, "load", SwapDesktopMobileFilters);
AddEvent(window, "resize", SwapDesktopMobileFilters);

I can't see that doing this has any detrimental results.

Many thanks for pointing me in the right direction.
norman
Site Admin
Posts: 1248
Joined: Sat Feb 07, 2004 9:55 pm

Re: Images work off-line but not on-line

Post by norman »

It's possible that the lies you removed were crashing JavaScript thus preventing my add-on's JS from executing.
Norman
Rob
Posts: 3
Joined: Thu Sep 17, 2015 5:44 pm

Re: Images work off-line but not on-line

Post by Rob »

Yes - and I see that this has come up before in this forum, so other people must have the same problem:

viewtopic.php?f=14&t=819
norman
Site Admin
Posts: 1248
Joined: Sat Feb 07, 2004 9:55 pm

Re: Images work off-line but not on-line

Post by norman »

Wow. My own forum (but a year ago) and I'd completely forgotten about it.
Norman
Post Reply