Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer Double click, two orders charged


Guest

Recommended Posts

I had a cart once that had a little snippet of code that stopped the customer from double clicking on the final checkout button. It's obvious when orders come in this way and they can be deleted and refunded, but it would be better to prevent it than correct it each time. Can anyone help with a bit of code for this?

Link to comment
Share on other sites

I had a cart once that had a little snippet of code that stopped the customer from double clicking on the final checkout button. It's obvious when orders come in this way and they can be deleted and refunded, but it would be better to prevent it than correct it each time. Can anyone help with a bit of code for this?

well, as you said, you had a little cart once....

Treasurer MFC

Link to comment
Share on other sites

Yes, and a wise businessperson would have saved all that code to look back on it and learn but...

 

you could try this :

 

in the header of checkout_confirmation :

 

<script language="JavaScript">

<!--

var _submitted = false;

 

validate = function () {

_submitted = ( ! _submitted ) ? true : true ;

if ( _submitted ) document.getElementById( "checkout_confirmation" ).submit() ;

}

-->

</script>

 

 

for the button :

 

echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER, ' onClick="validate();" ') . '</form>' . "\n";

Treasurer MFC

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...