Auto Address Search Service
Auto Address Search Service
The Google auto address search service, suggests several addresses i.e. when a customer/user starts typing address, autocomplete /auto-suggest will fill the rest.
The Address fields system will give auto-suggestion for the fields using the Google APIs, just like the way the browser gives suggestions to fill in details. However, a customer will have the liberty to ignore the provided suggestion and enter their own address details.
This auto address search functionality will be available on User Registration Page, Guest Checkout Page, and Shipping Address Page and manage Address on Cart section.
This article walks you through the steps to set up the Google Auto-Address Search Feature –
Step – 1 Create a New Project
Visit https://console.developers.google.com/ and login with your Google Account. After a successful login, create a New Project from a ‘NEW PROJECT’ Button.
- Enter your Project Name and Location to create a New Project.
- You can also use an existing project rather than creating a new one.
Step – 2 Enable Places API
After creating the project, the page will redirect you to your project dashboard. Click on the ‘ENABLE APIS AND SERVICES’ button.
- In the API Library, search Maps JavaScript API in the search bar and select the same. Click on Enable.
Step – 3 Enable Maps JavaScript API
Similarly, enable the Places API.
Step – 4 Get an API Key
To use the Places API you must have an API key.
- Click the menu button and select APIs & Services > Credentials.
- On the Credentials page, click Create credentials > API key.
The API key created dialog displays your newly created API key. Copy the key.
- Click Close.
The new API key is listed on the Credentials page under API keys.
To restrict the API key
- Click on the exclamation icon on the API Key (as shown in the picture).
- In the ‘Edit Settings’ page find API Restrictions and restrict the key for ‘Maps JavaScript API’ and ‘Places API’
- Click on Save.
Step – 5 Configuration into Admin Panel
Admin can enable the setting from -
- Select that where Customer will get, the auto-suggestion option – it can be Address Line 1, Address Line 2, City, Zip Code, Company Name.
- According to the select field, customers will get auto suggestions.