VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: tutnet on December 18, 2014, 09:39:41 am

Title: Cart Module VM3.0.0
Post by: tutnet on December 18, 2014, 09:39:41 am
Hi,

First off: well done team on VM3 - great job.

I had a problem with my add to cart button not adding anything to the cart when the Cart Module was published - neither in the module or the cart page.

I was getting a jQuery error, jQuery(...).live is not a function, on line 24 of /modules/mod_virtuemart_cart/mod_virtuemart_cart.php

My template uses jQuery 1.9.1

The code in question is:

Code: [Select]
jQuery("body").live("updateVirtueMartCartModule", function(e) {
the .live event handler was deprecated in jQuery 1.7 and removed in 1.9 (http://api.jquery.com/live/ (http://api.jquery.com/live/))

In order to get this resolved it simply takes changing the .live to .on

Code: [Select]
jQuery("body").on("updateVirtueMartCartModule", function(e) {
and all works again......

Hope this helps someone.

Title: Re: Cart Module VM3.0.0
Post by: Milbo on December 18, 2014, 21:56:40 pm
Thank you for the snippet, may it help others.

We use now the same jquery version as joomla 3, but more included.

Please try to disable the jquery of your template and try to use the vm one. It will prevent a lot other problems (not only vm).