We all like to style our Magento add to cart button as an image button. The problem is that IE 8 (Internet Explorer 8) will add the product twice and cause the quantity of that product in the cart to double up. There is an easy fix to this problem.
<input type="image" src="<?php echo $this->getSkinUrl('add-to-basket.png') ?>"
name="image-button" onclick="productAddToCartForm.submit(); return false;" />
Notice the return false; that I’ve added after the productAddToCartForm.submit().
This will fix the problem of IE submitting the add to cart button twice.
Update (Thanks Barcaro) :
File where edit is to be made…
(change /default/default/ to your custom template path).