Download the PHP package ctidigital/module-google-address-lookup without Composer
On this page you can find all versions of the php package ctidigital/module-google-address-lookup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ctidigital/module-google-address-lookup
More information about ctidigital/module-google-address-lookup
Files in ctidigital/module-google-address-lookup
Package module-google-address-lookup
Short Description Provides an address lookup service on a Magento 2 store powered by the Google Places API
License MIT
Informations about the package module-google-address-lookup
Google Address Lookup for Magento 2
The Google Address Lookup module makes use of the Google Places API Web Service to provide the following functionality to your Magento 2 store.
- Minimise address input errors by providing a post-code lookup service.
- Reduce the number of visible input fields on the checkout by hiding city, state, street 1, street 2 and post-code fields.
- Provide a manual address input override which will display the hidden fields.
Note: The Google Places API offers 150,000 FREE daily lookup requests for users that validate their account and add billing information. If you require more than 150,000 lookup requests daily then you can register to a paid plan. See Usage Tiers & Pricing
Configuration
After installing the module you will need to enable the module and generate a Key for the Google Places API Web Service in the Google Console (see further reading).
Enabling the Module:
Store->Configuration->CtiDigital->Google Autocomplete
Config Value | Notes |
---|---|
Enable/Disable | if module is enabled then checkout configuration will be overridden and Google API is attached |
API Key | Enter your Google Places API Web Service key (see further reading) |
Address Lookup
Once enabled, the post-code lookup service will be used on:
- Guest Checkout
- Registered Customer Checkout (if they are adding a new address)
- My Account Address Management
Further Reading
Google Places API Google Places API Examples
Implementation Details
- Configuration of checkout fields is in etc/frontend/di.xml This configuration is processed in CtiDigital/GoogleAddressLookup/Block/Checkout/LayoutProcessor.php
- Google Address fields are mapped in etc/frontend/di.xml and processed in CtiDigital/GoogleAddressLookup/Block/Js/GoogleApi.php. It will allow for easy third-party customizations like adding custom fields that should be also autocompleted.
- Javascript modules are written in es6 and compiled with gulp using babel. Src and dist files are in CtiDigital/GoogleAddressLookup/view
Screenshots