Jump to content
zitu4life

Customize states file dist.states.json is it possible?

Recommended Posts

Hello there

I was exploring   dist.states.json   file and looks   that    USA and   Canada has   pre-default   country states. Also  I try to edit   dist.states.json to   make   states for other  country but it do not works.  What I am missing out?


    "CA": [
        {
            "code": "AB",
            "name": "Alberta"
        },
        {
            "code": "BC",
            "name": "British Columbia"
        },
        {
            "code": "MB",
            "name": "Manitoba"
        } 
    ]

I was thinking that it should be easy , and just editing\overriding for example  Canada with initials  "CA"  to for example   China  "CN"      and also overriding   "code": "Z4",
            "name": "zitu4life"  but it do not work!

I have see all country has    initials  "CA" on   dist.countries.json that will be used on   dist.states.json 

How can I   create  dropdown states for  other country to work like USA and Canada?

Edited by zitu4life

Share this post


Link to post
Share on other sites

Edit /assets/js/StatesDropdown.js but don't forget to backup and replace this file every time you update WHMCS. Sadly states don't work as countries 😞 ironically I opened a very similar thread few hours ago. I really hope that states will support override in the near future.

Share this post


Link to post
Share on other sites
13 hours ago, Kian said:

Edit /assets/js/StatesDropdown.js but don't forget to backup and replace this file every time you update WHMCS. Sadly states don't work as countries 😞 ironically I opened a very similar thread few hours ago. I really hope that states will support override in the near future.

Thanks!   It works now.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated