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
standard template?
Protostar?
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.