News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Confirm purchase button not working in Opera / IE8

Started by norris, December 28, 2014, 03:27:29 AM

Previous topic - Next topic

norris

I had a customer say the final step of clicking "Confirm purchase" button didn't work in IE; it just reloaded the page.

I confirmed the problem in Opera 12.16 and IE8.  (Not sure what version of IE the customer used.)  The store worked fine in Firefox.

Virtuemart 2.6.12.  I'm pretty sure this worked fine in Opera under 2.0.26d, as I developed and tested the store extensively then.

I believe the problem is nested forms - the Update quantity/delete buttons for each item are nested inside the main checkoutForm.

I made an override of components/com_virtuemart/views/cart/tmpl/default.php and moved this line further down so the forms are no longer nested:

<form method="post" id="checkoutForm" name="checkoutForm" action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart' . $taskRoute, $this->useXHTML, $this->useSSL); ?>">

This seems to have fixed the issue.

I also had some javascript errors about vm2front trying to call stopVmLoading and startVmLoading, in this file and in plugins/vmpayment/paypal/paypal/helpers/paypalstd.php  I replaced these stopVmLoading and startVmLoading calls with the code they run:

$("body").addClass("vmLoading");
$("body").append("<div class=\"vmLoadingDiv\"><div class=\"vmLoadingDivMsg\">"+msg+"</div></div>");

if( $("body").hasClass("vmLoading") ){
     $("body").removeClass("vmLoading");
}