Prevent Users From Clicking "Place Order" Button Twice

I have a client that wants to be sure that the customers can’t click on the Place Order button more than once. I found an old post for 1.3.x, but I haven’t seen anything for 2.2.4. Do any of you guys know what I can do to keep people from clicking the button more than once?



maybe write a notice under the place order image (click one time only)


using ajax after click the place order button become whirl

Yep, I thought about a notice, but if there is a way to prevent it, I'd way rather do that.

What is a whirl?



whirl, its like loading a website in the icon of chrome/ie/firefox there will be a circle round until the page is open

i found this method by place order in amazon

when click, the image place order change into the loading thing

so people cant click it twice.

I did this for 2.0x. I do not remember the exact code off the top of my head, but I added some simple javascript to the button that disables it after the onclick function. Search google and you can find similar javascript to use.


I had forgotten about it, but I believe I had someone right something for us on version 1.3.4. Do you think that would work in this version? If so, do you have any idea where I would look in the old version to find the code?

Thanks guys, I really appreciate the responses.

I've tried a couple of JS things, but it seems that no matter what I try, something seems to be wrong. Kind of frustrating.


I'd love to know the code you used, if you could find it.


There are a couple of posts about this for 1.3.x, but the code has changed and I haven't figured out how to change it for 2.2.4 yet.

I'll keep playing with it. It can't be that difficult, right?



I was able to find some code I used. It was actually used on the Add to Cart button to stop people from adding multiple items by mistake. But the code should be similar for the Place Order button.

I changed

{include file=“buttons/button.tpl” but_text=$but_text|default:$lang.add_to_cart but_type=“” but_onclick=$but_onclick but_href=$but_href but_target=$but_target action_but=“action_” but_style=$but_style}


{include file=“buttons/button.tpl” but_text=$but_text|default:$lang.add_to_cart but_type=“” but_onclick=“$but_onclick;document.getElementById('place_order_button_$product.product_id').innerHTML = 'Item added to Shopping Cart';” but_href=$but_href but_target=$but_target action_but=“action_” but_style=$but_style}

Note the new but_onclick behavior. It replaced the button with the simple text “Item added to [color=#282828][font=arial, verdana, tahoma, sans-serif]Shopping Cart[/font][/color]” after the button is clicked, therefore preventing double clicks.

Hope this helps


name that .tpl please


Depends what button you want to change. I think in my case I was changing addtocart.tpl