#Multi-Click Order Submit for OrderCloud
This solution will stop the issue in which users click the submit and/or approve buttons multiple times.
##Setup
###1. Update the js/controllers/approvalInputCtrl.js
file in your project.
If you are using file overrides, create a new file override named js/controllers/approvalInputCtrl.js
and add this file as the content by following these steps:
- Edit your 2.0 site
- Go to “Code Editor” tab
- Hit “New File Override”
- Name this file
js/controllers/approvalInputCtrl.js
- Place raw code in the section below. Save.
###2. Update the js/controllers/checkOutViewCtrl.js
file in your project.
If you are using file overrides, create a new file override named js/controllers/checkOutViewCtrl.js
and add this file as the content by following these steps:
- Edit your 2.0 site
- Go to “Code Editor” tab
- Hit “New File Override”
- Name this file
js/controllers/checkOutViewCtrl.js
- Place raw code in the section below. Save.
###3. Update the partials/controls/approvalInput.html
file in your project.
If you are using file overrides, create a new file override named partials/controls/approvalInput.html
and add this file as the content by following these steps:
- Edit your 2.0 site
- Go to “Code Editor” tab
- Hit “New File Override”
- Name this file
partials/controls/approvalInput.html
- Place raw code in the section below. Save.
###4. Update the partials/controls/checkoutButtons.html
file in your project.
If you are using file overrides, create a new file override named partials/controls/checkoutButtons.html
and add this file as the content by following these steps:
- Edit your 2.0 site
- Go to “Code Editor” tab
- Hit “New File Override”
- Name this file
partials/controls/checkoutButtons.html
- Place raw code in the section below. Save.
To learn more about styling with Bootstrap, visit this page. To learn more about coding with AngularJS, visit this page.