News:

Looking for documentation? Take a look on our wiki

Main Menu

Virtuemart Checkout Button not working

Started by ray_shadow, June 16, 2017, 05:59:50 AM

Previous topic - Next topic

ray_shadow

VirtueMart 3.2.2
Joomla! 3.5.1

I am having a problem in my checkout button in my cart page. When i click the button it is not functioning. I looked into the console and it is throwing this error.
Uncaught TypeError: jQuery(...).vm2front is not a function

Now i went to my default.php in my cart folder and commented this code and it is working already.

QuotevmJsApi::addJScript('vm.checkoutFormSubmit',"
Virtuemart.bCheckoutButton = function(e) {
   e.preventDefault();
   //jQuery(this).vm2front('startVmLoading');
   //jQuery(this).attr('disabled', 'true');
   jQuery(this).removeClass( 'vm-button-correct' );
   jQuery(this).addClass( 'vm-button' );
   jQuery(this).fadeIn( 400 );
   var name = jQuery(this).attr('name');
   var div = '<input name=\"'+name+'\" value=\"1\" type=\"hidden\">';

   jQuery('#checkoutForm').append(div);
   //Virtuemart.updForm();
   jQuery('#checkoutForm').submit();
}


But my problem is this error did not exist when I was using Virtuemart 2. When i upgrade to Virtuemart 3 it started throwing this error.
Is this because of vm2front function not supported in Virtuemart 3?
I hope you can help me with this.
Thanks


GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers [url="https://www.gjcwebdesign.com"]https://www.gjcwebdesign.com[/url]
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
[url="https://extensions.joomla.org/profile/profile/details/67210"]https://extensions.joomla.org/profile/profile/details/67210[/url]
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

Yes, VM3 does make use of vm2front.  Are you using the default VirtueMart template system or a template with overrides? (GJC beat me to that!) Check that your template loading vmsite.js

If you really do use Joomla 3.5.1 then you should update to Joomla 3.7.2 - not only for security reasons, but because VM 3.2+ does not work properly with Joomla versions before J3.7.
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