Hi Matt,
When finalizing a purchase and selecting US as the country, Alabama is selected as the default state. Is there any way, to have it not auto select any regions and require the users to select by themselves?
I'm assuming you are referring to the Vendr.Checkout package with this question?
If so, there isn't anything in there yet to do it this way but it could probably be updated to make it work.
I think you'd currently need to update the vendrcheckout.js file in App_Plugins\VendrCheckout\Scripts and modify the showRegions method.
In here you'll probably want to update it so that before the forEach call you inject an option with a blank value attribute and a body of "Please select a Region", then in the bit that shows / hides the input, extend this to also add / remove a required attribute to the select list.
If you do make these changes, you'll just need to be careful when upgrading Vendr.Checkout in the future as they will get overwritten. Or, if you implement this and it works, you're more than welcome to submit a PR on project on GitHub https://github.com/vendrhub/vendr-checkout
Make region picking mandatory
Hi Matt, When finalizing a purchase and selecting US as the country, Alabama is selected as the default state. Is there any way, to have it not auto select any regions and require the users to select by themselves?
/Victor
Hi Victor,
I'm assuming you are referring to the Vendr.Checkout package with this question?
If so, there isn't anything in there yet to do it this way but it could probably be updated to make it work.
I think you'd currently need to update the
vendrcheckout.js
file inApp_Plugins\VendrCheckout\Scripts
and modify theshowRegions
method.In here you'll probably want to update it so that before the
forEach
call you inject an option with a blank value attribute and a body of "Please select a Region", then in the bit that shows / hides the input, extend this to also add / remove a required attribute to the select list.If you do make these changes, you'll just need to be careful when upgrading Vendr.Checkout in the future as they will get overwritten. Or, if you implement this and it works, you're more than welcome to submit a PR on project on GitHub https://github.com/vendrhub/vendr-checkout
Hope this helps
Matt
is working on a reply...