Loki_QuoteAddressExtended

Other
PHP 8.1 - 8.4
Magento 2.4.7 | 2.4.8
CSP Yes
PHPStan 1
Magento PHPCS 10

Magento version PHP version License Latest Version

Installation

Install this package via composer:

composer require loki-checkout/magento2-quote-address-extended

Next, enable this module:

bin/magento module:enable Loki_QuoteAddressExtended

Usage

This module adds a table loki_quote_address_extended with one row per quote address (quote_address_id). When the order is placed, each row is linked to the matching order address (order_address_id).

To store a custom value:

  1. Add a column to loki_quote_address_extended via your own etc/db_schema.xml (plus db_schema_whitelist.json).
  2. Add a field block to the Loki Checkout whose name ends with the column name (e.g. loki-checkout.customer.example_address_field), using the template Loki_FieldComponents::form/field.phtml. Optionally add the block arguments:
    • address_type: shipping, billing or auto (default; the shipping address, or the billing address for virtual quotes);
    • field_name: the column name, when it differs from the last part of the block name.
  3. Register the block in your etc/loki_components.xml with the group quoteAddressExtendedFields.

To display the value:

  • Frontend (current quote): Loki\QuoteAddressExtended\ViewModel\CheckoutQuoteAddressExtendedView::getValue('example_address_field', 'auto')
  • Admin order and invoice pages: Loki\QuoteAddressExtended\ViewModel\Adminhtml\OrderAddressExtendedView::getValue('example_address_field', 'auto')
  • Order and invoice emails: {{var loki_shipping_address_extended.example_address_field}} and {{var loki_billing_address_extended.example_address_field}}

Rows that are linked to neither a quote address nor an order address are removed by the cron job loki_quote_address_extended_delete_orphaned_rows.

See Loki_QuoteAddressExtendedExample for a complete example.

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation

WARNING: This module has no releases yet. If you want to use it, make sure to add the version @dev to the composer command.

Support

For getting support, create an Issue under the following project URL:

https://gitlab.yireo.com/loki-checkout/Loki_QuoteAddressExtended.git

Composer details
Magento module name
Loki_QuoteAddressExtended
Composer name
loki-checkout/magento2-quote-address-extended
Composer version
No release yet
Default branch
main
Requirements
loki-checkout/magento2-core: ^2.3
loki/magento2-components: ^2.2
loki/magento2-field-components: ^2.2
magento/framework: ^103.0
magento/module-cron: ^100.4
magento/module-quote: ^101.2
magento/module-sales: ^103.0
psr/log: ^1.0 | ^2.0 | ^3.0
php: >=8.2 <8.6
Releases
Changelog

Added

  • Add table loki_quote_address_extended with model, resource model, collection and repository
  • Link extended quote address data to order addresses
  • Add cron job to delete orphaned rows

Last modified: October 1, 2026