cluster Posted October 25, 2017 Share Posted October 25, 2017 Hi, how can I remove countrys from the order form dropdown list? I have already tried w/ /includes/country.php and /resources/country/countries.json file but it does not work ... In this doc it clear not clear if anything inside this file should be removed first and how should the complete file looks like after modification ... https://docs.whmcs.com/Customising_Countries_and_Calling_Codes 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted October 25, 2017 WHMCS Developer Share Posted October 25, 2017 What exactly have you tried? In your resources/country/countries.json file, add the country you want to remove with false as the option { "GB": false }, { "US": false } 0 Quote Link to comment Share on other sites More sharing options...
cluster Posted October 25, 2017 Author Share Posted October 25, 2017 OK, the content looks like: { "AF": { "name": "Afghanistan", "callingCode": 93 }, "AX": { "name": "Aland Islands", "callingCode": 358 }, "AL": { "name": "Albania", "callingCode": 355 }, ... } should I remove all code first and only put this into the file without main brackets {}? only: { "GB": false }, { "US": false } 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 25, 2017 Share Posted October 25, 2017 don't edit /resources/country/dist.countries.json, just add the countries you want to remove to /resources/country/countries.json (as per your 2nd code block) 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted October 25, 2017 WHMCS Developer Share Posted October 25, 2017 6 minutes ago, cluster said: OK, the content looks like: { "AF": { "name": "Afghanistan", "callingCode": 93 }, "AX": { "name": "Aland Islands", "callingCode": 358 }, "AL": { "name": "Albania", "callingCode": 355 }, ... } This looks like the main file - don't edit this. Only edit the countries.json file - if it doesn't exist, you can create it. 6 minutes ago, cluster said: should I remove all code first and only put this into the file without main brackets {}? only: { "GB": false }, { "US": false } This would remove the UK and US as countries available for selection. You should update as needed. 0 Quote Link to comment Share on other sites More sharing options...
cluster Posted October 25, 2017 Author Share Posted October 25, 2017 thank you guys 0 Quote Link to comment Share on other sites More sharing options...
cluster Posted October 25, 2017 Author Share Posted October 25, 2017 strange ... for me it does not work, using the modern cart theme 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 25, 2017 Share Posted October 25, 2017 36 minutes ago, cluster said: strange ... for me it does not work, using the modern cart theme testing on v7.2.3, it's working for me on both standard_cart and Modern... perhaps you need to clear template/browser cache? so if I add "GB" to countries.json and set it to false, it's removed from the dropdown list at checkout... I have no reason to think it wouldn't do the same in v7.3, but I haven't checked... which version are you using ? 0 Quote Link to comment Share on other sites More sharing options...
cluster Posted October 25, 2017 Author Share Posted October 25, 2017 ah ok, it seems only one bracket is needed here ;-) { "AF": false, "AX": false, "AL": false } 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.