VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: ydl on July 13, 2016, 08:34:24 AM

Title: term-of-service avoid ajax
Post by: ydl on July 13, 2016, 08:34:24 AM
In the shopping cart I have a selectios (shippment method) and a check box (terms of service)

On both changes and AJAX request is fired.

Is it possible to disable the AJAX of the terms of service?
Title: Re: term-of-service avoid ajax
Post by: Jumbo! on July 13, 2016, 23:23:19 PM
You can add the following JavaScript to your template.

(function($){
$(function() {
$('input[name="tos"][type="checkbox"]').off('change').on('change', function(e) {
e.preventDefault();
return false;
});
});
})(jQuery);
Title: Re: term-of-service avoid ajax
Post by: ydl on July 14, 2016, 15:17:50 PM
Thank - it works
Title: Re: term-of-service avoid ajax
Post by: Jumbo! on July 14, 2016, 20:36:50 PM
You are welcome.