PHPackages                             yireo-training/magento2-example-address-field-note - 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. yireo-training/magento2-example-address-field-note

ActiveMagento2-module

yireo-training/magento2-example-address-field-note
==================================================

Example module showing how to add custom fields to the checkout

71153PHP

Since Aug 19Pushed 5y ago2 watchersCompare

[ Source](https://github.com/yireo-training/magento2-example-address-field-note)[ Packagist](https://packagist.org/packages/yireo-training/magento2-example-address-field-note)[ RSS](/packages/yireo-training-magento2-example-address-field-note/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yireo ExampleAddressFieldNote
=============================

[](#yireo-exampleaddressfieldnote)

This module integrates a new fields (`note`) in various ways in the existing fieldsets of a shipment address. The `note` field follows the pattern of an Extension Attribute (programmatically added value).

- Setup procedure
- Shipment Address step in the checkout
- Address form under the Customer Account

Installation
------------

[](#installation)

```
composer require yireo-training/magento2-example-address-field-note:dev-master

```

### Setup procedure

[](#setup-procedure)

Through a file `Setup/InstallData.php` the field `note` is added to the database as an invisible field. The only purpose for this EAV attribute is to serve as backend to show the behaviour of Extension Attributes. Normally, an Extension Attribute would sync itself with some other table or perhaps even an external resource. This is only an example. If you need to a EAV attribute after all, forget about this approach and create a Custom Attribute instead. This procedure for Extension Attributes is to allow for complexer attributes to be stored outside of EAV.

### Address form under the Customer Account

[](#address-form-under-the-customer-account)

This is actually bad code: While the customer-entity can be cleanly extended using a form API, the address form is not easy to extend: Its fields are hard-coded in PHTML. Therefore, a plugin was created (`etc/di.xml`) to hack the new field `comment` (`Block/Address/Edit/Field/Note.php`) into the right place.

The block-class calls for the `note` value through the Extension Attribute code.

### XML file `extension_attributes.xml`

[](#xml-file-extension_attributesxml)

To make the field `note` known as an Extension Attribute, it is added to the file `extension_attributes.xml`.

### Shipment Address step in the checkout

[](#shipment-address-step-in-the-checkout)

The `note` field is added through the Extension Attribute method. There are 2 ways to add your own fields in the checkout: Either through XML layout code or through a PHP-based layout processor. The latter is choosen in this example, because it would allow for the XML layout update to be done automatically (depending on some kind of PHP logic). The layout processor is first added to `etc/di.xml` and then defined in `Processor/NoteAddressField.php`.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a6a4e3ec0e7f3a8d2d223c90c5545319fc0a382afd3bc10cd910fedc0fa8f5d?d=identicon)[yireo-training](/maintainers/yireo-training)

---

Top Contributors

[![jissereitsma](https://avatars.githubusercontent.com/u/7670482?v=4)](https://github.com/jissereitsma "jissereitsma (12 commits)")

### Embed Badge

![Health badge](/badges/yireo-training-magento2-example-address-field-note/health.svg)

```
[![Health](https://phpackages.com/badges/yireo-training-magento2-example-address-field-note/health.svg)](https://phpackages.com/packages/yireo-training-magento2-example-address-field-note)
```

PHPackages © 2026

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