cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Address attributes not flowing through system

Custom Address attributes not flowing through system

Hi,

 

I have a magento 2.2.7 install with the ability to add custom address attributes. we've added one, jd_edwards_id, and it shows in the address tabs. When we have a record that has both a billing jd_edwards_id and a shipping jd_edwards_id, the shipping jd_edwards_id value flows through the system and makes it into the order details. The billing address jd_edwards_id does not. The module/etc/fieldset.xml shows as below.

 

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:DataObject/etc/fieldset.xsd">
    <scope id="global">
        <fieldset id="order_address">
            <field name="jd_edwards_id">
                <aspect name="to_billing_address" />
            </field>
        </fieldset>
        <fieldset id="sales_convert_quote_address">
            <field name="jd_edwards_id">
                <aspect name="to_order_address" />
            </field>
        </fieldset>
        <fieldset id="order_address">
            <field name="jd_edwards_id">
                <aspect name="to_shipping_address" />
            </field>
        </fieldset>
    </scope>
</config>

Every else seems to work with the module, fields are presented and data is saved to the database. 

 

Appreciate any help in getting this data to flow to the order.

 

Thanks,

 

Bastien

1 REPLY 1

Re: Custom Address attributes not flowing through system

I wonder if something funky is going on with the merging. You can try collating the order_address `aspect` nodes, not sure if this will fix it but it's worth a try:

 

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:DataObject/etc/fieldset.xsd">
    <scope id="global">
        <fieldset id="sales_convert_quote_address">
            <field name="jd_edwards_id">
                <aspect name="to_order_address" />
            </field>
        </fieldset>
        <fieldset id="order_address">
            <field name="jd_edwards_id">
                <aspect name="to_shipping_address" />
                <aspect name="to_billing_address" />
            </field>
        </fieldset>
    </scope>
</config>
----------------------------------------------------------
Mark Shust · ZCE, MCD+, M2CSS, M2CAD
https://markshust.com