Author Topic: Product is added to cart from Category view but not from Detail view  (Read 2352 times)

The Yellow Fellow

  • Beginner
  • *
  • Posts: 25
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!

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27601
  • Always on vacation
    • Jenkin Hill Internet
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.6.10.10211 on Joomla 3.9.13 PHP 7.0.33

The Yellow Fellow

  • Beginner
  • *
  • Posts: 25
Sorry, my bad...  :-[

I use VirtueMart 3.0.9 on Joomla 3.4.1

The Yellow Fellow

  • Beginner
  • *
  • Posts: 25
Some extra info and things I've tried so far:
  • Disabled my template override (I use it for displaying the categories in the detail view, kinda like tags);
  • Created a new product without any custom fields;
  • The quantity plus and minus buttons don't work in detail view either (they do in category view)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9244
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
sounds like a javascript error on the detail page - plenty of info on here about debugging JS
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

The Yellow Fellow

  • Beginner
  • *
  • Posts: 25
Quote
sounds 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?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9244
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
without a live url no one can help you
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

The Yellow Fellow

  • Beginner
  • *
  • Posts: 25
Category view: http://goo.gl/hmXHxA
Detail view: http://goo.gl/u6wgFL

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9244
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

The Yellow Fellow

  • Beginner
  • *
  • Posts: 25
Re: Product is added to cart from Category view but not from Detail view
« Reply #9 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...


The Yellow Fellow

  • Beginner
  • *
  • Posts: 25
Re: Product is added to cart from Category view but not from Detail view
« Reply #10 on: June 15, 2015, 16:30:37 pm »
Anyone?

The Yellow Fellow

  • Beginner
  • *
  • Posts: 25
Re: Product is added to cart from Category view but not from Detail view
« Reply #11 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.  :)