experius/module-extracheckoutaddressfields

1.2.3 2023-06-30 06:37 UTC

This package is auto-updated.

Last update: 2024-08-30 01:20:52 UTC


README

为 Magento 2 添加额外的收货地址字段到结账页面

  • 它将额外的地址属性字段名、数据范围重命名为 customAttributes.{attribute_code} LayoutProcessor
  • 通过 JavaScript 混合将它们从 customAttributes 传输到 extension_attributes
  • 插件
  • 在事件中从对象传输值到对象。例如,从报价地址传输到订单地址

用法

  1. 添加 fieldset.xml
 <scope id="global">
        <fieldset id="extra_checkout_billing_address_fields">
            <field name="attribute_code">
                <aspect name="to_order_address" />
                <aspect name="to_customer_address" />
            </field>
        </fieldset>
 </scope>
  1. 添加 extensions_attributes.xml
  2. 添加 customer_address 属性设置
  3. 添加 quote_address 字段设置
  4. 添加 order_address 字段设置

示例: 查看模块 ExtraCheckoutAddressFieldsTest