Skip to content

umizoomi/PostcodeNl_Api_Magento2

 
 

Repository files navigation

Postcode.eu International Address API module for Magento 2

Adds autocompletion for addresses to the checkout page. Multiple countries are supported using official postal data via the Postcode.eu API.

This module has been created by Postcode.nl and Flekto.

Postcode.eu Account

A Postcode.eu account is required. Testing is free. After testing you can choose to purchase a subscription.

Installation instructions

  1. Install this component using Composer:
$ composer require postcode-nl/api-magento2-module
  1. Upgrade, compile & clear cache:
$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile
$ php bin/magento cache:flush

OneStepCheckout.com configuration instructions

  1. Go to Stores -> Configuration -> Sales -> Postcode.eu Address API
    1. 'Change address fields position' to 'no'
  2. Go to Stores -> Configuration -> Sales -> OneStepCheckout
    1. The following fields need to be enabled for the billing and shipping fields:
      1. street.0
      2. postcode
      3. city
      4. region
    2. Add the following fields to the billing and shipping fields:
      1. address_autofill_nl.postcode
      2. address_autofill_nl.house_number
      3. address_autofill_nl.house_number_select
      4. address_autofill_intl
      5. address_autofill_formatted_output
    3. Optional: you may need to apply some custom CSS to display the fields correctly. You may set the region field to hidden.

License

The code is available under the Simplified BSD License, see the included LICENSE file.

Screenshots

International autocomplete:

Dutch address by postcode and house number:

Option to show formatted output:

About

A Magento 2 plugin that implements the Postcode.nl international address API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 45.2%
  • PHP 40.2%
  • CSS 9.1%
  • HTML 3.3%
  • Less 2.2%