This patch will allow multiple timers to countdown as expected.

I've done some basic testing, and it seems to work.
Please let me know if you find a bug or issue.

CommentFileSizeAuthor
uc_lto_js.patch3.61 KBtseven

Comments

agaglani’s picture

I applied the patch but still doesn't seem to work. The timer will only countdown if I am on the page (product) only. If i'm on the home page, for example, and have multiple product teasers then none will countdown. Also, when looking at all products in a certain category, it will not work either even if there is only one product.

tseven’s picture

I only tested this patch for my very specific need and it's not the best solution.

The problem is, at present, there isn't a mapping between the timer expiration timestamp, and the timer html on the front-end.

My current solution is to add the timer's expiration as a rel='1349009200' tag of the timer.

This way, in the timer's .js I can do something like:

expiration = $(this).attr('rel');

"this" referencing the current timer being processed by the timer script.

If anybody is interested in this solution, I may re-roll a patch including this.

Right now I'm adding the rel tag through standard templating procedures so I don't have to modify the modules core code.

diseño web palma de Mallorca’s picture

hiii, I need this feature, would it work in views??, I have several nodes in views, but when I add 2 products, then the timer does not count and resets to Zero.

thanks

diseño web palma de Mallorca’s picture

yep !! patch works finally !! don know why it was not working yesterday, but now works great !!! thanks