Author Topic: Help me please ! Problem with add to cart button  (Read 2173 times)

zifou57

  • Beginner
  • *
  • Posts: 6
Help me please ! Problem with add to cart button
« on: October 03, 2019, 00:39:39 am »
Hello All,

In advance thank you for your help.

Firstly my versions :
- Virtuemart 3.6.2 (latest)
- Joomla : 3.9.12 (latest)

I have upgrade my virtuemart from 3.4.3 to 3.6.2, since in the front page user cannot click on add to cart button, and there is an error on the console :
Code: [Select]
vmprices.js?vmver=f4a26974:95 Uncaught TypeError: Cannot read property 'showActivity' of undefined
    at Object.Virtuemart.cartEffect (vmprices.js?vmver=f4a26974:95)
    at Object.Virtuemart.sendtocart (vmprices.js?vmver=f4a26974:83)
    at HTMLInputElement.Virtuemart.addtocart (vmprices.js?vmver=f4a26974:216)
    at HTMLInputElement.dispatch (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
    at HTMLInputElement.v.handle (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
Virtuemart.cartEffect @ vmprices.js?vmver=f4a26974:95
Virtuemart.sendtocart @ vmprices.js?vmver=f4a26974:83
Virtuemart.addtocart @ vmprices.js?vmver=f4a26974:216
dispatch @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
v.handle @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2

But in mobile mode no problem.

Here my parameter on virtuemart :
  • Utilisez une Fancybox (recommand√©) : Checked
  • Use the VirtueMart CSS : not Checked
  • Use Joomla jQuery framework in FE : Checked
  • Use VirtueMart jQuery UI scripts : not Checked
  • Use the product scripts : Checked
  • Use the script ajax Countries / Regions : Checked
  • Utiliser jQuery pour les listes d√©roulantes sur le site : not Checked
  • Utiliser AJAX pour la description des produitsChecked :
  • Use external Google jQuery library (deprecated)Checked :

The template is : https://www.virtuemarttemplates.net/virtuemart-templates/axxen-virtuemart-template.html

Can someone explain me what's the problem, it seems vmprice don't find a variable, but I have see that jQuery is loaded once and before.

Thank you for your help.



GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10170
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Help me please ! Problem with add to cart button
« Reply #1 on: October 03, 2019, 09:29:16 am »
showActivity is only related to the fancybox

Code: [Select]
Virtuemart.cartEffect = function(form) {

var dat = form.serialize();

if(usefancy){
jQuery.fancybox.showActivity();
}

is /components/com_virtuemart/assets/js/fancybox/jquery.fancybox-1.3.4.pack.js being loaded?

as a test try the the standard template or uncheck fancybox
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

zifou57

  • Beginner
  • *
  • Posts: 6
Re: Help me please ! Problem with add to cart button
« Reply #2 on: October 03, 2019, 20:57:05 pm »
Thank for your reply, I don't have jquery.fancybox-1.3.4.pack.js loaded.

- First, I uncheck fancy box support, and there is my error :
Code: [Select]
vmprices.js?vmver=f4a26974:129 Uncaught TypeError: jQuery.facebox is not a function
    at Object.<anonymous> (vmprices.js?vmver=f4a26974:129)
    at u (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
    at Object.fireWith [as resolveWith] (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
    at C (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
    at XMLHttpRequest.n (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
(anonymous) @ vmprices.js?vmver=f4a26974:129
u @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
fireWith @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
C @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
n @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
XMLHttpRequest.send (async)
send @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
ajax @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
Virtuemart.cartEffect @ vmprices.js?vmver=f4a26974:98
Virtuemart.sendtocart @ vmprices.js?vmver=f4a26974:83
Virtuemart.addtocart @ vmprices.js?vmver=f4a26974:216
dispatch @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
v.handle @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2

- Next I Add to the header the javascript to be loaded and is loaded correctly, but I have this error :
Code: [Select]
jquery.fancybox-1.3.4.pack.js:25 Uncaught TypeError: d.onCleanup is not a function
    at Q (jquery.fancybox-1.3.4.pack.js:25)
    at F (jquery.fancybox-1.3.4.pack.js:25)
    at I (jquery.fancybox-1.3.4.pack.js:21)
    at Function.b.fancybox (jquery.fancybox-1.3.4.pack.js:38)
    at Object.<anonymous> (vmprices.js?vmver=f4a26974:117)
    at u (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
    at Object.fireWith [as resolveWith] (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
    at C (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
    at XMLHttpRequest.n (jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2)
Q @ jquery.fancybox-1.3.4.pack.js:25
F @ jquery.fancybox-1.3.4.pack.js:25
I @ jquery.fancybox-1.3.4.pack.js:21
b.fancybox @ jquery.fancybox-1.3.4.pack.js:38
(anonymous) @ vmprices.js?vmver=f4a26974:117
u @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
fireWith @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
C @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
n @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
XMLHttpRequest.send (async)
send @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
ajax @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
Virtuemart.cartEffect @ vmprices.js?vmver=f4a26974:98
Virtuemart.sendtocart @ vmprices.js?vmver=f4a26974:83
Virtuemart.addtocart @ vmprices.js?vmver=f4a26974:216
dispatch @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2
v.handle @ jquery.min.js?0b96b12cbaf778e094b4c1309ee06d35:2

Any other solution to try ?

Thank you.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10170
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Help me please ! Problem with add to cart button
« Reply #3 on: October 03, 2019, 21:01:42 pm »
try with the standard Beez template .. if it works then get your template supplier to fix their template
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

zifou57

  • Beginner
  • *
  • Posts: 6
Re: Help me please ! Problem with add to cart button
« Reply #4 on: October 03, 2019, 21:12:45 pm »
When I select the beez template, I can't see the different button, but I will contact the company to have an update.

Thank you for your help !!

beny.rfg

  • Beginner
  • *
  • Posts: 23
  • A beginner
Re: Help me please ! Problem with add to cart button
« Reply #5 on: June 07, 2021, 21:52:52 pm »
Hello Zifou57, I have the same issue with the same template, have you fixed?

Thanks, Petr