Jump to content

remove countrys from order form?


cluster

Recommended Posts

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

Link to comment
Share on other sites

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
}

 

Link to comment
Share on other sites

  • WHMCS Developer
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.

Link to comment
Share on other sites

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

B4a6Uhs.png

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 ?

Link to comment
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