Google Address Autocomplete
Customers and vendors start typing an address and pick it from Google's suggestions — street, apartment, city, state, country and postcode all fill themselves. Works on checkout, profiles, vendor registration and the a...
Customers and vendors start typing an address and pick it from Google's suggestions — street, apartment, city, state, country and postcode all fill themselves. Works on checkout, profiles, vendor registration and the a...
Typing a complete address is often the slowest part of checkout, and even a small typo can cause delivery problems.
The Google Address Autocomplete add-on makes address entry faster and more accurate. Customers simply type a few characters, select the correct address from Google’s suggestions, and the relevant address fields are filled automatically.
After the customer selects an address, the add-on can automatically complete:
The country is selected first and its standard CS-Cart change event is triggered. This allows CS-Cart to rebuild the state field normally before the add-on selects the correct state.
States are matched using:
If CS-Cart does not have predefined states for the selected country, the add-on fills the free-text state field instead.
The add-on works across the following storefront and administration areas:
Shipping and billing address sections work independently. You can enable or disable either section without affecting the other, and an address selected in one section will never populate the other.
A small location icon can be displayed inside the address field. When the customer clicks it, the browser requests permission to access their current location. Permission is never requested automatically.
The add-on uses the accuracy reported by the customer’s device:
If the customer declines location permission, checkout continues normally and the address can still be entered manually.
The add-on is designed to preserve the standard behaviour, appearance and structure of CS-Cart.
The administration panel provides the following configuration options:
Google allows autocomplete requests to be restricted to a maximum of five countries.
For better performance, the Google autocomplete widget is not initialized until the customer types the configured minimum number of characters. If the customer does not interact with an address field, the widget is not created.
Debug logging is disabled by default. When enabled, the Google API key is masked before any information is written to logs or error messages.
For security, the Google API key should be restricted by HTTP referrer, as recommended by Google.
Until a valid Google API key is entered, the add-on does not load or display anything on the storefront.
All address forms continue to work exactly as they do in a standard CS-Cart installation.