PHPackages                             afd/module-pce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. afd/module-pce

ActiveMagento2-module

afd/module-pce
==============

PCE Integration for Magento 2

1.8.3(2mo ago)115.9k↓20%2[1 PRs](https://github.com/afd-software/pce-magento-2/pulls)PHP

Since Apr 14Pushed 2mo agoCompare

[ Source](https://github.com/afd-software/pce-magento-2)[ Packagist](https://packagist.org/packages/afd/module-pce)[ RSS](/packages/afd-module-pce/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (31)Used By (0)

 [ ![AFD Software](https://camo.githubusercontent.com/2e56065d2802f51e0d7b161849107c373fda37d91fb1a3bf5de9d8e5fe78bf1a/68747470733a2f2f7777772e6166642e636f2e756b2f77702d636f6e74656e742f75706c6f6164732f323032312f31302f6c6f676f46756c6c2e737667) ](https://www.afd.co.uk)---

Magento 2 Integration
=====================

[](#magento-2-integration)

Introduction
------------

[](#introduction)

The AFD PCE Magento module harnesses the power of our powerful "Postcode Evolution" engine and makes it available in the world's most popular eCommerce platform.

Key Features
------------

[](#key-features)

- Streamline address entry at checkout with typeahead address searching.
- Enhanced email address validation using AFD Software's [email validation service](http://www.afd.co.uk/email).
- Phone number validation and masking using AFD Software's [phone number validation service](https://www.afd.co.uk/phone).
- Expanded address data collection such as geolocation, geodemographics and deprivation indexes that can be used to segment and analyse customer data.
- Seamless integration with our lightning fast Postcode Evolution API.
- Clear the clutter on the checkout page by only showing address fields that are relevant to the user.

If you require AFD functionality to work in a different way or on a different page, we would love to hear from you and tailor the integration so it fits your requirements.

Get Started
-----------

[](#get-started)

To get started with AFD Software's Magento integration you will need authentication credentials. If you don't yet have authentication credentials contact our sales team on +44 (0)1624 811 711 or email us at .

- Install the module via composer `composer require afd/module-pce`

Typeahead
---------

[](#typeahead)

[![](https://camo.githubusercontent.com/ae7a04cef659ed109187b29eb848c6ad2d2e54107ce3b186e93febd22fc702a2/68747470733a2f2f63646e2e6166642e636f2e756b2f7765622f696d616765732f6c616e64696e672d70616765732f61646f62652d636f6d6d657263652f6a6f652d62726f776e732d6578616d706c652e676966)](https://camo.githubusercontent.com/ae7a04cef659ed109187b29eb848c6ad2d2e54107ce3b186e93febd22fc702a2/68747470733a2f2f63646e2e6166642e636f2e756b2f7765622f696d616765732f6c616e64696e672d70616765732f61646f62652d636f6d6d657263652f6a6f652d62726f776e732d6578616d706c652e676966)

Typeahead address searching makes inputting addresses a much more pleasant experience for the customer and ensures that the data that is collected is accurate - essential for eCommerce.

Typeahead is available on the following forms:

- Checkout - Shipping and Billing
- My Account - Address Management
- Admin - Manage Customer Address
- Admin - Create Order

Our Magento typeahead plugin comes equipped with these great features:

- Easy and accurate address entry using these data sets:
    - UK addresses via [PAF](http://www.afd.co.uk/data-sets/paf/)
    - Republic of Ireland Addresses via [Eircode](http://www.afd.co.uk/data-sets/eircode/)
    - Rest of world via [WorldAddress](http://www.afd.co.uk/products/worldaddress/)
- Restructure address forms to optimise for address searching with the following options:
    - Enable searching for only a specifc set of countries or all countries
    - Hide address fields until search is complete and continue to hide any blank fields
    - Move country field to the top of the address form
    - Manual input option in case user wants to input manually or addrsss could not be found
    - Hide search field after address retrieve is complete
    - Hide region field for countries that do not require region as part of their address (e.g. UK)
- Consise searching:
    - Highlight the segment of the results that match the search string
    - Set the number of search results shown

Reverse Geocoding
-----------------

[](#reverse-geocoding)

It is also possible to retrieve a users address using the browser geolocation api. Activating this feature will add a button next to the typeahead field that when clicked will ask the user for permission to access their location, after permission has been granted our integration will collect the location from the device and perform a reverse geocoding lookup that will return a list of the closest addresses to user's current location.

Email Address Validation
------------------------

[](#email-address-validation)

AFD Software's [email validation](http://www.afd.co.uk/email/) service can not only check whether or not the syntax of an email address is valid, but also if it is a genuine live email address.

After an email address is entered into an email address control, as soon as the control loses focus our plugin will first check the syntax of the email address is correct, if the syntax is valid a request will be sent to the AFD servers to check whether or not the email address is real. If at either point the result is invalid then the form control will become invalid and an error message will be displayed.

This functionality is available on the following forms:

- Checkout - Logged Out
- Create New Account
- My Account - Change email address
- Contact Us
- Newsletter Signup
- Admin - Manage Customer

Email validation is a valuable merchants tool for merchants as it helps prevent typos in email addresses forms and help prevent fraud.

Our module comes equipped with the following customisation options:

- Enable and disable functionality individually for each form
- Customise error message that is shown when an email address is invalid

Phone Number Validation
-----------------------

[](#phone-number-validation)

AFD Software's [phone number validation](http://www.afd.co.uk/phone/) service can not only check whether or not the format of a phone number is valid, but also if it is a genuine active phone number.

When a phone number is entered into a phone number form control, once the control loses focus, the AFD Magento module will first check whether or not the format of the phone number is correct. If the format is correct then a request will be sent to AFD's server to check whether or not the phone number is real. If at either point the result is that the phone number is not valid, the form field will be marked as invalid and an error message will be displayed.

Additionally the field will mask the phone number so that it is displayed in the standard format for that country. For example, UK phone number `01624811711` will be reformatted to `01624 811 711`.

This functionality is available on the following forms:

- Checkout - Shipping and Billing
- My Account - Address Management
- Contact Us
- Admin - Manage Customer Address
- Admin - Create Order

Our module comes equipped with the following customisation options:

- Enable and disable functionality individually for each form
- Customise error message that is shown when a phone number is invalid
- Set a default country that will be assumed if no international dialing code is entered

Additional Information
----------------------

[](#additional-information)

*This feature is only available to merchants that use Magento Enterprise Edition*

When using typeahead searching on the frontend it is possible to capture additional information associated with the captured address. This additional information includes:

- All standard [AFD Postcode Plus](http://www.afd.co.uk/comparison/) data
- AFD Software's [Censation](http://www.afd.co.uk/data-sets/censation/) geodemographic data set
- Occupancy Information
- Multiple Deprivation Indexes

The data collected is assigned to Magento native "Custom Customer Address Attributes" and so can then be used for filtering and segmenting customers to help analysis and marketing.

The screenshot below is an example of how the data is displayed on the order page in the admin panel.

[![](https://camo.githubusercontent.com/64683bc94eebdcdb0eaf295c3c2c169cf6eb5f0cf9b84737dc7c77b7a8b76880/68747470733a2f2f7777772e6166642e636f2e756b2f696d672f313038302f696e746567726174696f6e732f6d6167656e746f2d63656e736174696f6e2e706e67)](https://camo.githubusercontent.com/64683bc94eebdcdb0eaf295c3c2c169cf6eb5f0cf9b84737dc7c77b7a8b76880/68747470733a2f2f7777772e6166642e636f2e756b2f696d672f313038302f696e746567726174696f6e732f6d6167656e746f2d63656e736174696f6e2e706e67)

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~73 days

Recently: every ~59 days

Total

30

Last Release

89d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75b3f3b69b4a1f7a11a7321e8479e39789cc607b76a364791914b9b7699ffb0b?d=identicon)[matthew.dolman](/maintainers/matthew.dolman)

---

Top Contributors

[![matthewdolman-afd](https://avatars.githubusercontent.com/u/63630011?v=4)](https://github.com/matthewdolman-afd "matthewdolman-afd (26 commits)")[![svetlanaAFD](https://avatars.githubusercontent.com/u/228902559?v=4)](https://github.com/svetlanaAFD "svetlanaAFD (21 commits)")[![RyanHepburn](https://avatars.githubusercontent.com/u/51991280?v=4)](https://github.com/RyanHepburn "RyanHepburn (5 commits)")[![amberiom](https://avatars.githubusercontent.com/u/36078618?v=4)](https://github.com/amberiom "amberiom (3 commits)")[![PhilipDorricott](https://avatars.githubusercontent.com/u/239764855?v=4)](https://github.com/PhilipDorricott "PhilipDorricott (1 commits)")

### Embed Badge

![Health badge](/badges/afd-module-pce/health.svg)

```
[![Health](https://phpackages.com/badges/afd-module-pce/health.svg)](https://phpackages.com/packages/afd-module-pce)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
