Hi all,

This theme is great, and have it running together with uc_ajax_cart.

The problem is that adding a product takes a few seconds, during which a user is likely to click again on the add to cart button, resulting in 2 purchases instead of 1.

My idea is to disable the add to cart button using javascript just after it is clicked. So I've looked for the input button html in node-product.tpl.php. But, it's only listed as

print $fusion_uc_add_to_cart;

Anyone any pointers towards where i can add the onclick event to the add to cart button to disable it? I've looked in the fusion code too, but can't figure it out.

Tnx

Comments

sheena_d’s picture

Status: Active » Closed (fixed)

You should add this sort of javascript to an external javascript file within your theme. You can learn more about how javascript is handled in Drupal by reading the documentation here: http://drupal.org/node/121997