On checkout page using local database if customer enter zip code then city/state /country auto complete.

Is any free extension available which completes the customer's city/state/country by using only their zip code?

  • 1
    I think this is impossible, because several countries (espacially in EU) have the same ZIP-type, so there could be the same number in two different countries as well. If you choose country and start typing ZIP, this extention can do the rest: magentocommerce.com/magento-connect/… Oct 5 '13 at 11:27
  • 2
    the extension @StefanGregori suggested is very nice but as a small side note, since it uses a local database and not an API there is no guarantee that the data is up to date.
    – Sander Mangel
    Oct 5 '13 at 12:17
  • You are right @Stefan country selection is must for this. With little changes, extension you said works for me. Thanks.
    – Sandesh
    Nov 21 '13 at 7:59
  • Also thanks to @Sander for valuable suggestion.
    – Sandesh
    Nov 21 '13 at 8:01
  • 1
    @DavidManners I did. allow me some time I will post the answer.
    – Sandesh
    May 21 '14 at 9:43

This extension provides the functionality requested, allowing a local database to be added and edited for any region:


It does have some issues with which can be resolved by the following (taken from the Magento Connect page):

After installing this plugin the Region field was giving an error in the checkout. I solved this by editing the phtml files in the folder:

/app/design/frontend/<YOUR PACKAGE>/<YOUR THEME>/template/addresscomplete/checkout/onepage/

in billing.phtml :

Search for billingRegionUpdater

Replace line for:

var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');

and in shipping.phtml:

Search for shippingRegionUpdater Replace line for :

var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode');

Not the answer you're looking for? Browse other questions tagged or ask your own question.