Author Topic: Cart Module VM3.0.0  (Read 1855 times)

tutnet

  • Beginner
  • *
  • Posts: 23
Cart Module VM3.0.0
« 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/)

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.


Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10213
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Cart Module VM3.0.0
« Reply #1 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).
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/