Support

Home Forums Event Espresso Premium Disable "Complete Purchase" button on click

Disable "Complete Purchase" button on click

Posted: April 4, 2013 at 5:21 pm

Viewing 5 reply threads


CyberInnovation.com

April 4, 2013 at 5:21 pm

We have an occasional issue where the site user, clicks the “Complete Purchase” more than once on the Payment Confirmation page resulting in multiple charges against their credit card. Is there not a way to disable the “Complete Purchase” button upon the click event?


Dean

April 5, 2013 at 4:44 am

Hi,

There is a way to do it using jQuery.

For example on click you can use the attr attribute to disable the button.

jQuery('#aim_submit').click(function() {
    jQuery('#aim_submit').attr('disabled', true); //stop load button being clicked when processing
});

The above uses the AIM gateway as an example.

Now that would be ok so long as it progresses to the next page. Problem is, my jQuery ability isnt good enough to figure out how to implement

    jQuery('#aim_submit').attr('disabled', FALSE); //stop load button being clicked when processing

which makes the button clickable if the user fails to fill out the form for any reason.

I will certainly add this to a feature request for future versions, but cannot say if or when it would get implemented.


CyberInnovation.com

April 5, 2013 at 12:17 pm

OK…as a (possibly) simpler solution, we are considering just adding a text message out to the side of the button that says “ONLY CLICK THIS ONCE” or something to that effect.
In reviewing the various .php files, though, I am not sure where that change would need to be made. I am fairly proficient with HTML, CSS, and some PHP but I am having difficulty determining which .php file should be edited. I have searched for the button’s text “Complete Purchase” but with no success. Can you point me in the right direction?


Sidney Harrell

April 5, 2013 at 6:32 pm

Which gateway are you using?


CyberInnovation.com

April 6, 2013 at 9:47 am

We are using the FirstData gateway.


Sidney Harrell

April 7, 2013 at 8:56 pm

gateways/firstdata/firstdata_vars.php line 125

Viewing 5 reply threads

The support post ‘Disable "Complete Purchase" button on click’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso