Page 1 of 1

Images work off-line but not on-line

Posted: Thu Sep 17, 2015 6:03 pm
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.

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

Posted: Tue Sep 22, 2015 7:41 am
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.

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

Posted: Tue Oct 06, 2015 7:16 pm
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.

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

Posted: Wed Oct 07, 2015 11:42 am
by norman
It's possible that the lies you removed were crashing JavaScript thus preventing my add-on's JS from executing.

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

Posted: Wed Oct 07, 2015 4:57 pm
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

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

Posted: Wed Oct 07, 2015 5:55 pm
by norman
Wow. My own forum (but a year ago) and I'd completely forgotten about it.