News:

Looking for documentation? Take a look on our wiki

Main Menu

Add to Cart Doesn't Work, JQuery Only Loading Once

Started by Rabble, January 05, 2012, 04:17:17 AM

Previous topic - Next topic

Rabble

I am using the RocketTheme template "Momentum".  As far as I can tell, JQuery is only being loaded once on the page.  I have tried all of the following to trouble shoot and none has worked for me:

1. Toggling JQuery option: Use external google jquery library
2. Turning off "Using the Virtuemart jQuery" and using Easy JQuery Plugin instead
3. Using JVitals jvFixScript
4. Turning off "Using the Script ajax Countries / Regions"
5. Turning off as much template javascript as I can, including the entire menu system

No combination of these options has made the add to cart button work. The Add to Cart button does work on the Atomic template, and it does work on another RocketTheme template that I'm using for testing.  So I know the problem is related to the template, but it's not due to JQuery loading twice and it doesn't appear to be due to a JavaScript issue...Firebug shows 0 errors and around 15 warnings.

I would love to try VirtueMart, but this is a bit of a show stopper. I researched on this forum and it seems like several people are having this issue, I would love to know how to trouble shoot the problem and make VirtueMart work the template I want to use.  TIA for any advice.

PRO

cant have a look when your site is password protected

jenkinhill

Try without Rokbox as that has previously caused issues with VirtueMart.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Rabble

Quote from: BanquetTables.pro on January 05, 2012, 08:43:06 AM
cant have a look when your site is password protected

Sorry, I mentioned the site is offline, which is why I posted up the source code.  I understand this type of problem is hard to diagnose without being able to load the page in a browser.  I would be happy to send you log in credentials, let me know if it's ok to PM them to you.

Quote from: jenkinhill on January 05, 2012, 10:29:35 AM
Try without Rokbox as that has previously caused issues with VirtueMart.

Thanks for the suggestion, I turned off RokBox and it did not make the the Add to Cart button work.  The strange part is if I switch to another RocketTheme template (Mercado), the Add to Cart Button works.  The only thing changing between the two states is the template, and the Gantry features they use (which are pretty similar).  So I don't *think* this problem is related to any content/system plugins.  I have 0 modules published on the site, and the main menu is being driven through Gantry.  If I turn off the menu and all other JS features in the Gantry admin interface, Add to Cart still doesn't work.   

Rabble

Nevermind, I figured it out... I had an HTML override for the default product view and the CSS class of the add to cart button was changed, which is what caused the function to fail.  As soon as I changed the CSS class back to "addtocart-button", it worked.  Problem solved....hope this helps someone else.   :P