I'm trying to disable the "continue" button in che...
# suitecommerce
d
I'm trying to disable the "continue" button in checkout when order total crosses 'X' dollars using an extension. not sure if we can do this via extension ideas?
s
What are you trying to do?
d
If the order total crosses a certain amount say 100$. I want to disable the continue button until user edits cart and makes the order total less than 100$ like I'm trying to place a restriction on maximum amount that can placed using credit card
s
I see. There are three parts to this: 1. Some configuration (probably with your payment processor) to disallow orders over $100. 2. Backend validation on the order that will prevent orders with values over $100 AND where credit card is used. 3. Frontend validation that will do the same AND show errors / prevent order submit when this is true. Specifically what you're talking about is events. You will need to tie a
beforeSubmit()
event on the Cart extensibility API component to show an error message about what went wrong (https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/Frontend/Cart.html#event:beforeSubmit). I am not sure disabling the checkout button is good usability, but for that you would need to bind an event to submit button's view to disable it.
👍 1
d
I'll give a try with the events. Thanks Steve
s
d
That was greatly helpful. Thanks a lot Steve
netsuite halo 1