Default Billing country

Hey guys - have my first Webflow commerce site ready to go, the client will be only selling to Ireland which is fine for the shipping but i need the default billing country to be Ireland not united states - I cannot see a way to change this?

Hey @Shaneod,

I had the same issue but managed to get this working by adding this bit of custom code before the end of the body tag on the checkout page.

<script>
selectElement('country', 'GB')

function selectElement(id, valueToSelect) {    
let element = document.getElementById(id);
element.value = valueToSelect;
}
</script>

You’ll need to add an ID to the country select box called ‘country’ and also change ‘GB’ to ‘IE’. That will default the country to Ireland.

4 Likes

Hey Dan - thanks a million, i’ll give that a try! legend!

1 Like

Hi Dan,

This is what I’m looking to do to however when I add it to my site it glitches and appears to lose the delivery options. Please see my website below (please be aware this is a test site to confirm I can do this function) any help would be fantastic

https://preview.webflow.com/preview/playground-9a6d65?utm_medium=preview_link&utm_source=designer&utm_content=playground-9a6d65&preview=b95879b8f17b21bf21b1787aa2c85cca&pageId=5f3fc82b5e3506c5ec545d1a&mode=preview

Hey @Peter_Marshall,

The preview links appears to be broken so I’m assuming you’ve fixed it. If not, republish your link and I’ll see if I can help in any way.

1 Like

Is there a way to get this to work for the PayPal checkout option-which keeps the user in the checkout popup, rather than take them to the checkout page like it does with Stripe?

I’m not sur sorry @rhys_dyson. You could try reaching out to Webflow support if you still need help with this.

This is also happening to me!

https://www.farmadoc.es/checkout

Looks like you figured this out @ubolivar, your Country is defaulting to Spain for me :slight_smile:

Hi Dan,

The problem now is that the custom code makes the Shipping method section of the checkout dissapear and I don’t know how to stop it from doing that.