Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

Learn more about...


Disable "Complete Purchase" Button on Checkout Page

Using AspDotNetStorefront ML

I'm trying to disable the "Complete Purchase" button on my checkout page (/checkout1.aspx) until a customer checks a checkbox acknowledging they understand our shipping timelines. I've tried setting the button to enabled = false as well as setting it to enabled = false at Page_Load. Neither option disables the button.

Assuming I can get the button disabled, I plan on enabling it when a checkbox is checked. My code for that would be:

Protected Sub chkBxShipAgree_CheckedChanged(sender As Object, e As System.EventArgs) Handles chkBxShipAgree.CheckedChanged
            btnContinueCheckout.Enabled = True
End Sub

Is this something that needs the source code to implement?
asked Mar 26, 2015 in ML by Potzi (380 points)
retagged Apr 7, 2015 by Potzi

1 Answer

0 votes
Best answer

Have you attempted to disable it using client side scripting, such as Javascript?  It isn't 100% fool-proof this way, but it wouldn't require source code.
answered Apr 22, 2015 by pligon (1,750 points)
selected Apr 12, 2016 by Potzi
This is what I ended up doing. I wrapped the button in a <div> tag, hide it using style="visibility:hidden;" , and then used Javascript to make it visible once a checkbox was checked.