Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Victor Bjørholm 58 posts 180 karma points
    Apr 14, 2021 @ 14:34
    Victor Bjørholm
    0

    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

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Apr 14, 2021 @ 15:13
    Matt Brailsford
    0

    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 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

    Hope this helps

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft