VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: syrupneko on October 21, 2012, 03:50:56 AM

Title: 'add to cart' doesn't work in Chrome
Post by: syrupneko on October 21, 2012, 03:50:56 AM
My question is: how can I get the "add to cart" button to work in the Google Chrome Browser without having to disable the VirtueMart Jquery?

With the VirtueMart Jquery enabled, the "add to cart" button does absolutely nothing when clicked (at least for me, running Google Chrome on a windows 7 machine.) However, in IE9 it gives a pop-up box that asks if the shopper wants to check out or continue shopping.  Disabling the VM jquery does get the button to work in Chrome, however this causes the page to send me to the shopping cart.

It's not a big deal if I must disable VM Jquery, however I would very much like to keep that popup box if I can, as it helps keep the customer immersed in the shopping experience.

Has anyone figured out a solution, or disabling it my only option for now until a future release?

Thanks.
Title: Re: 'add to cart' doesn't work in Chrome
Post by: syrupneko on October 21, 2012, 07:43:43 AM
Ok, great now, I'm finding that "add to cart" doesn't work at all. I didn't realize it earlier, but it was just sending me to an empty cart with Jquery off!!! What's going on here? Does VM2 just not work at all with Chrome?
Title: Re: 'add to cart' doesn't work in Chrome
Post by: jenkinhill on October 21, 2012, 10:35:25 AM
Yes, VM2 does work in Chrome, but most likely you have a JavaScript conflict with a script in your Joomla template, menu or some other module/component - usually something loading another version of JQuery. Somebody could possibly help a bit more if you stated which versions of Joomla/VM/PHP you are using and provided a url.

As the issue shows most in Chrome then use the inbuilt developer tools to look for the issue. There are a coup[le of tutorials for this:
http://odetocode.com/blogs/scott/archive/2012/03/13/debugging-javascript-with-chrome.aspx
https://developers.google.com/chrome-developer-tools/docs/scripts-breakpoints
Title: Re: 'add to cart' doesn't work in Chrome
Post by: bytelord on October 21, 2012, 10:45:55 AM
As jenkinhill told if a js conflict, please also read the following:

Firebug usage: http://forum.virtuemart.net/index.php?topic=98505.0
JS Conflicts: http://dev.virtuemart.net/projects/virtuemart/wiki/General_JS-Problems_with_templates_and_jQuery
and http://dev.virtuemart.net/projects/virtuemart/wiki/JavascriptCSS_Template_Overrides_and_Avoiding_Conflicts_between_Libraries

Any live url?

Regards