Change the order and scope of the autocomplete typeahead for billing/shipping address

We use a different order in the Netherlands:

Street - House Number - Postal Code - City

For our user base an address with the house number first is just weird.

Is there a way to change the order of the Typeahead autocomplete?
And if so, is there a way to scope it to just addresses in our country?

Hey @Ronald,

Weā€™re working on improvements regarding the address autocomplete, it works well for customers in North America at the moment, but we noticed some issues for customers in Europe for instance.

We can disable this feature for your account until we make the improvements, if youā€™d like us to proceed with this, just send us a quick email at support@snipcart.com with the email associated to your Snipcart account and weā€™ll update it.

Thanks,

1 Like

Thanks for your answer.

Yeah, I can understand it works very well in North America. :slight_smile:

I chose to not use autocomplete for now, but to override the checkout components. So nothing to disable here I guess?

Exactly, overriding the component is another way to disable the feature. Since it was requested by quite a lot of users, we decided to feature flag it too, so we can disable it per account on our side too.

1 Like

Hi there @charles ! In the release notes for the last update I noticed a line:
ā€œBilling and shipping address autocomplete feature in the cart was improved for customers in Europe.ā€

Is that related to this issue? I donā€™t see it fixed, can you share what changes have you done?

1 Like

I still see the address in the ā€˜wrongā€™ order so I guess not that. :slight_smile:

@charles From what I can tell, you are calling https://app.snipcart.com/api/localization/addresses/... to ā€œlocalizeā€ the addresses.

But Iā€™m not sure why exactly are you doing that since Google already sends you the local address. No matter where the webshop is, the addresses should be in their native format, and Google provides you with exactly that (formatted_address is in the correct format).

I guess youā€™re using Address Component Types to fill the fields for checkout - in that case, the simplest solution would be to compare the formatted_address with the one you can recreate, and see if its street_number route (e.g. 226 Rue Saint-Joseph E) or the other way around.

1 Like

Strangely address format worked fine for us until very recently, when addresses started to get jumbled up into the US-prone format. Maybe that helps in narrowing down the issue.

It is quite a serious problem for non US-accounts as it suddenly requires manually rechecking the shipping address for each and every order. One of my clients is about to jump ship because of this ā€¦ :grimacing: