Search by

loki-checkout / magento2-quote-address-extended

loki-extensions

Store additional quote address data in a separate table and link it to the order address

Package info

github.com/LokiExtensions/Loki_QuoteAddressExtended

Type:magento2-module

pkg:composer/loki-checkout/magento2-quote-address-extended

Fund package maintenance!

yireo

www.paypal.me/yireo

Statistics

Installs: 0

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

0.0.2 2026-10-29 14:43 UTC

This package is not auto-updated.

Last update: 2026-11-06 16:27:20 UTC


README

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

GitLab CI Pipelines