zitu4life Posted January 28, 2020 Share Posted January 28, 2020 (edited) 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 January 28, 2020 by zitu4life 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 28, 2020 Share Posted January 28, 2020 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. 0 Quote Link to comment Share on other sites More sharing options...
zitu4life Posted January 29, 2020 Author Share Posted January 29, 2020 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. 0 Quote Link to comment Share on other sites More sharing options...
AzeDK Posted November 9, 2020 Share Posted November 9, 2020 Please give it some love 🙂 https://requests.whmcs.com/topic/allow-stateregion-overrides 1 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted January 13, 2021 Share Posted January 13, 2021 Why even have dist.states.json if it isn't used? That seems... Stupid 😅 1 Quote Link to comment Share on other sites More sharing options...
AzeDK Posted March 18, 2021 Share Posted March 18, 2021 @DennisHermannsen Its still an issue with latest WHMCS 8.1.13 and Twenty-One theme. Its a bug, and should not be a feature request. @WHMCS John Is it on a bug track list ? Reproduce problem: - set "State/Region" optionally in General Settings > Other "Optional Client Profile Fields" and remove all checkmarks from "Locked Client/User Profile Fields".- Go into /clientarea.php?action=details and set Country to "Denmark" and leave "State/Region" empty, and try save changes. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.