This article applies to the new and old designer. Not sure which designer you have? Check here.

Normally the selected country is equal to that of your own country in the address of your store. This article will describe how to set this equal to a new country.

To find the list of country codes you can inspect the page or view the source of the selector you are editing, as seen below:

In the Code Editor, navigate to components > Checkout > and click Add New. Name the new file `component.js`and click save. Now, add the following lines of code (Example here is setting country = United Kingdom):


<script type='text/javascript'>
var adjust_checkout = function(){
$(".country-selector").val("GB");
$("#card_country").val("GB");
};

$( document ).ready( function(){
if($('#city').val()==''){
adjust_checkout();
}
});
</script>

If your theme does not have a `components` folder, this means you're using an old theme. The Javascript you will use is the same as above, you will just need to add it to your `/html/checkout.html` file instead and include `{% block page_javascript %}` on the first line and `{% endblock %}` on the last line.