Can I create a custom address autocomplete with Checkout UI extensions?
I can see it’s possible to insert a new text field into the shipping form, but it doesn’t appear possible to update the existing address fields with the selected address, or am I wrong there?
We built a simple version of this for checkout.liquid, and it was easy to set the address across the different address fields from the address selected:
The Google Places autosuggest in the checkout can’t be replaced, only turned on or off.
With the new Checkout extensibility apps, we were able to make an API request to a third-party address validation service, to ensure the address suggested by Google Places is accurate.
If not, we display a custom alert banner like this:
Here in Chile we don’t have autocomplete address feature activated, so we need created a custom one. All the shopify stores in my country with plus has this customization.
Can you please explain in more details: “With the new Checkout extensibility apps, we were able to make an API request to a third-party address validation service, to ensure the address suggested by Google Places is accurate.”
I’m able to make API request, however we are not able to access shopify’s default address filed in DOM, in order to make autocorrect or suggestion.
I think Ryan-BW meant that they don’t use the address whisperer and autocomplete, they just validate if the address exists. If it doesn’t, it will display an error dialog.
I also wonder if this can be solved differently, in many countries google places doesn’t have such good data and there are different local address providers and will be great to use it.
Correctly, is not posible to interact with the dom in default chekout fields. But i read shopify bring us a solution in april of this year on the version 2024-04 of the shopify API.