less than a minute read • Updated 2 hours ago
How address autocomplete matches addresses
How the checkout's address autocomplete matches alternate spellings, ranks results, and adapts state fields by country.
Address autocomplete helps customers find their country and state faster by matching what they type against common alternate spellings, translations, and abbreviations, then ranking the results by relevance.
How it matches locations
A customer can type a country’s common name, an abbreviation, or a name in another language, and still find the right result. For example, typing “UK,” “GB,” “Great Britain,” “England,” or “Britain” all match “United Kingdom.” This also works across languages — “Spain” matches “España,” “Russia” matches “Россия,” and “Japan” matches “日本.”
How results are ranked
Matches are ranked using where the typed text appears in the location name (at the start of the name, the start of a word, or elsewhere), and whether it matches the main spelling or an alternate one. Locations are also weighted by overall sales volume across Foxy stores, so common selections like “United States” and “United Kingdom” appear above equally-relevant alphabetical matches.
State and province behavior
If a country has known states or provinces in the system — the United States, Australia, and Germany, for example — the state field also gets autocomplete and becomes required. If a country doesn’t have known states, such as France, New Zealand, the Netherlands, or Ireland, the state field is a plain text input that isn’t required. The field’s label also adapts to match how that region refers to states, using labels like “State,” “Canton,” “County,” or “Province.”
Notes
State labels are customizable from the checkout section of your store’s language settings in the Foxy admin.