As it says on the tin, LTO stops working when I change theme over to Acquia Prosper. Any ideas what is causing the javascript clash?

Thanks

Comments

Alex Regenbogen’s picture

I worked around it by giving all Fusion-based themes that I use a custom uc_lto.js.
In that, I have changed Drupal.settings.ucLTO.expiration to Drupal.settings.ucLTO.expiration[0] where found. (lines 16 and 22)

That worked for me, and I havent bothered looking into it any further ;)

dmendo11’s picture

This is the same problem I have. I am using Acquia Prosper and the javascript doesn't count down like it should. I have tried using the solution from Alex, but it didn't work.

Did you add the uc.lto.js to the js theme folder? Can you explain these a little bit more?

David

Alex Regenbogen’s picture

If you set the uc_lto.js to be read from the theme folder, all you have to do is place a js-folder inside the Acquia Prosper, and put the modified uc_lto.js in there...

in uc_lto.js on line 17: change
Drupal.settings.ucLTO.expiration *= 1000;
to
Drupal.settings.ucLTO.expiration[0] *= 1000;

and on line 23:
change
delta = Drupal.settings.ucLTO.expiration - now.getTime() + (now.getTimezoneOffset() * 60000);
to
delta = Drupal.settings.ucLTO.expiration[0] - now.getTime() + (now.getTimezoneOffset() * 60000);

That's all I did...
Hope this is clear enough! :-)

dmendo11’s picture

Alex,

I have tried what you have mention, but it is still not counting down. Do you have a sample of how it is suppose to be working?

I mean, mine is semi working. I do have the date for example: 2 days 14 hours 21 min 13 sec

But that is just static, it doesn't do the 13, 12, 11, 10, 9, 8... and so on. Is it suppose to do that?

David