Google Address Autocomplete for Magento Checkout

Filling the web forms details manually may be error-prone and may lead to the validation error which causes the delayed the shipping. So with help of Google Places API, we can find out the correct Google addresses to fill out “shipping address and billing address” on the checkout form which will reduce the human error while entering the details manually.


Generally, If a customer put wrong address, misspell the address, put incorrect ZIP code or STATE while writing addresses which causes the delayed the shipping. It affects the customer experiences. Google Places  API auto corrects the wrong input and guide the user toward multi-address and to help the user to find out exact addresses that customer needs based on user input.


Following are the high-level steps to integrate Google Places API in Magento.


Step 1: Create module Folio3_AutoPopulateAddress


Step:2: Create system configuration file etc/system.xml with following fields


Step 3: Add the following script in template/checkout/onepage.phtml


Congratulation! You have successfully integrated Google Places API with your Magento. Your final result should be like below.

You can also visit  Google Address Autocomplete Example page for a usage example and an extension Google Address Autocomplete For Checkout  is also available on Marketplace.

Leave a Reply

Your email address will not be published. Required fields are marked *