VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: The Yellow Fellow on May 29, 2015, 11:53:21 AM

Title: Product is added to cart from Category view but not from Detail view
Post by: The Yellow Fellow on May 29, 2015, 11:53:21 AM
I have a shop with some products that have custom fields to provide for some customer input.

In the frontend, when I click the Add-to-cart button from the Category view, the product is added to the Cart (without the customer having filled in the custom fields, obviously),
but when I click the Add-to-cart button from the Product Details view I do get transferred to the Cart, but the product isn't added.

I'm kinda stuck at the moment, please help me!
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: jenkinhill on May 29, 2015, 11:56:22 AM
http://forum.virtuemart.net/index.php?topic=128401.msg441154#msg441154
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: The Yellow Fellow on May 29, 2015, 12:01:33 PM
Sorry, my bad...  :-[

I use VirtueMart 3.0.9 on Joomla 3.4.1
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: The Yellow Fellow on May 29, 2015, 12:43:30 PM
Some extra info and things I've tried so far:
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: GJC Web Design on May 29, 2015, 14:33:01 PM
sounds like a javascript error on the detail page - plenty of info on here about debugging JS
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: The Yellow Fellow on May 29, 2015, 15:11:22 PM
Quotesounds like a javascript error on the detail page - plenty of info on here about debugging JS

No JS errors are showing up in Firebug, suggestions anyone?
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: GJC Web Design on May 29, 2015, 16:11:27 PM
without a live url no one can help you
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: The Yellow Fellow on May 29, 2015, 16:37:17 PM
Category view: http://goo.gl/hmXHxA
Detail view: http://goo.gl/u6wgFL
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: GJC Web Design on May 29, 2015, 19:59:07 PM
your loading jquery twice

http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js

http://dgll.test.biblionetdrenthe.nl/media/jui/js/jquery.min.js

add to cart from cat does nothing except throw Jq errors
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: The Yellow Fellow on June 02, 2015, 17:20:48 PM
I removed the second JQuery script from my template and installed a fresh Joomla 3.41 site with the same Virtuemart version on the same server (for comparison). It works fine in the freshly installed site (http://j3.test.biblionetdrenthe.nl/index.php/shop/testcat).

I compared all the JS and the only difference I can see is that in the non-working site jquery.noconflict.js is loaded by Virtuemart, which isn't the case with the fresh demo site.
I removed it using unset($this->_scripts[$this->baseurl .'/components/com_virtuemart/assets/js/jquery.noconflict.js?vmver=8847']); but that didn't help.

Choosing a different template (e.g. Protostar) doesn't help either  :( I'm kinda stuck...

Title: Re: Product is added to cart from Category view but not from Detail view
Post by: The Yellow Fellow on June 15, 2015, 16:30:37 PM
Anyone?
Title: Re: Product is added to cart from Category view but not from Detail view
Post by: The Yellow Fellow on June 15, 2015, 17:07:26 PM
Solved it myself!

I had disabled the Show Prices checkbox and it seems that was the cause of the problem. I now enabled the Show Prices checkbox and disabled all of the 'underlying' checkboxes and now the quantity box and the add to cart button are working again.  :)