Author Topic: Add to Cart Doesn't Work, JQuery Only Loading Once  (Read 3043 times)

Rabble

  • Beginner
  • *
  • Posts: 14
Add to Cart Doesn't Work, JQuery Only Loading Once
« on: January 05, 2012, 04:17:17 am »
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10352
  • VirtueMart Version: 3+
Re: Add to Cart Doesn't Work, JQuery Only Loading Once
« Reply #1 on: January 05, 2012, 08:43:06 am »
cant have a look when your site is password protected
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27478
  • Always on vacation
    • Jenkin Hill Internet
Re: Add to Cart Doesn't Work, JQuery Only Loading Once
« Reply #2 on: January 05, 2012, 10:29:35 am »
Try without Rokbox as that has previously caused issues with VirtueMart.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.10057 on Joomla 3.9.10 PHP 7.0.33
Testing VM 3.5.0.10097 on Joomla 3.9.10

Rabble

  • Beginner
  • *
  • Posts: 14
Re: Add to Cart Doesn't Work, JQuery Only Loading Once
« Reply #3 on: January 06, 2012, 04:17:29 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.

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

  • Beginner
  • *
  • Posts: 14
Re: Add to Cart Doesn't Work, JQuery Only Loading Once
« Reply #4 on: January 06, 2012, 04:49:28 am »
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