PHPackages                             yireo-training/magento2-example-address-field-comment - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. yireo-training/magento2-example-address-field-comment

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

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

Example module showing how to add custom fields to the checkout

51333PHP

Since Aug 19Pushed 5y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Yireo ExampleAddressFieldComment
================================

[](#yireo-exampleaddressfieldcomment)

This module integrates a new fields (`comment`) in various ways in the existing fieldsets of a shipment address. The `comment` field follows the pattern of a Custom Attribute (EAV 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-comment:dev-master

```

### Setup procedure

[](#setup-procedure)

Through a file `Setup/InstallData.php` the field `comment` is added to the database, plus it is added to some forms in the backend. Right after this step, you can already enter and save values for this Custom Attribute `comment` in the backend.

### 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/Comment.php`) into the right place.

The block-class calls for the `comment` value through the Custom Attribute code.

### Shipment Address step in the checkout

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

The `comment` value is added automatically to the checkout, because it is a Custom Attribute. This method is the recommended approach for simple values.

###  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-comment/health.svg)

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

###  Alternatives

[phannaly/php-datetime-khmer

The PHP library for convert datetime to Khmer

1510.3k](/packages/phannaly-php-datetime-khmer)[moosend/website-tracking

By installing the Moosend PHP Tracking library you are can track page views, product views, add to cart events and successful purchases. You can later use these details to segment your user base, run automations, check how successful your latest promo has been and how many conversions your landing page has led to.

1020.9k1](/packages/moosend-website-tracking)

PHPackages © 2026

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