VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Thomas Kampp on June 11, 2020, 22:47:32 PM

Title: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: Thomas Kampp on June 11, 2020, 22:47:32 PM
The subject says it all :) Change payment method is not working in Internet Explorer (ver. 11) after upgrade to VM 3.8.2. It flickers and then returns to the previous state/selection (that was on load of the cart view).

I know Internet Explorer is horrible, not supported and dead - but 7,8 % of my customers users use it due to some government regulation.
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: Jörgen on June 12, 2020, 07:36:48 AM
If this only happens with ie, then it is probably a Lost case.
Jörgen @ Kreativ Fotografi
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: Thomas Kampp on June 12, 2020, 09:41:01 AM
True (and rightfully so). I just wonder why it has worked until the newest release of Virtuemart? What and why was it changed... and could that part work with the old working code?
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: AH on June 12, 2020, 11:20:21 AM
I just tested and selection on delivery or payment methods fails to hold selection using IE 11

That is a bug as it used to function on 3.6 the JS has changed in 3.8.3 - there is no reason for it not to work!
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: Milbo on June 12, 2020, 12:18:52 PM
That is done without js. Disable the ajax for the cart, maybe.
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: AH on June 14, 2020, 11:13:06 AM
This has been fixed for ie11 in VM
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: Thomas Kampp on June 14, 2020, 22:26:57 PM
You mean fixed by disabling AJAX for the cart?
What implications (downsides) does that have?
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: Jörgen on June 14, 2020, 23:03:24 PM
Disabling AJAX is not neccessary any more. Max has made a bug fix for this in the next release.

Jörgen @ Kreativ Fotografi

Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: Thomas Kampp on June 15, 2020, 00:22:11 AM
Perfect - when will this be released?
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: AH on June 15, 2020, 10:38:37 AM
Thomas

This is the proposed fix:

Components/comvirtuemart/views/cart/view.html.php

Around line 542, change the javascript to what is shown below


Quote
jQuery(document).ready(function(){
   var chkOutBtn = jQuery("#checkoutFormSubmit");
   var form = jQuery("#checkoutForm");
   
   jQuery("#checkoutForm").find(":radio, :checkbox").bind("change", Virtuemart.autocheck);
   
//   jQuery(".output-shipto").find("input").unbind("change", Virtuemart.autocheck);
   jQuery ("input[type=radio][name=shipto]").unbind("change", Virtuemart.autocheck);
   jQuery ("input[type=radio][name=virtuemart_paymentmethod_id]").unbind("change", Virtuemart.autocheck);
   jQuery ("input[type=radio][name=virtuemart_shipmentmethod_id]").unbind("change", Virtuemart.autocheck);
   
   jQuery(".output-shipto").find(":radio").bind("change", function(){
      chkOutBtn.attr("task","checkout");
      
      '.$updF.'
      form.submit();
   });
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: Thomas Kampp on June 15, 2020, 13:47:26 PM
Confirmed. Seems to work. Thanks
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: Milbo on June 15, 2020, 14:06:57 PM
Actually, it was Andrew who found the fix.
Title: Re: Change payment method not working in Internet Explorer after upgrade to VM 3.8.2
Post by: AH on June 15, 2020, 16:13:10 PM
Thomas

this is what will probably be released to live

Quote
jQuery(document).ready(function($){
   var chkOutBtn = jQuery("#checkoutFormSubmit");
   var form = jQuery("#checkoutForm");
   
   $("#checkoutForm").find(":radio, :checkbox").bind("change", Virtuemart.autocheck);
   
   $ ("input[type=radio][name=shipto]").unbind("change", Virtuemart.autocheck);
   $ ("input[type=radio][name=virtuemart_paymentmethod_id]").unbind("change", Virtuemart.autocheck);
   $ ("input[type=radio][name=virtuemart_shipmentmethod_id]").unbind("change", Virtuemart.autocheck);
   
   $ ("input[type=radio][name=shipto]").bind("change", function(){
      chkOutBtn.attr("task","checkout");
      
      '.$updF.'
      form.submit();
   });
});';