0

I have a custom address attribute jd_edwards_id added to both the billing and shipping address tabs. The values may be the same number or they might be different. The client uses these numbers in their billing systems.

I have an export and I need to have those values included in the export but the values never make it to the appropriate billing and shipping address objects.

                        <xsl:value-of select="$sepstart" /><xsl:value-of select="../../billing/jd_edwards_id"/><xsl:value-of select="$sepend" />
                    <xsl:value-of select="$sepstart" /><xsl:value-of select="../../shipping/jd_edwards_id"/><xsl:value-of select="$sepend" />

I have some code that processes the JDE IDs where i am using a fieldset to set those fields

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:DataObject/etc/fieldset.xsd">
<scope id="global">
    <fieldset id="customer_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>

How do i address the data to his the correct properties in the billing and shipping objects? I can provide other info if needed.

Thanks,

Bastien

  • After further investigation, the problem seems to be the custom field for the billing address is not being passed from the quote_address table to the sales_order_address table. The shipping address value is being passed. – Bastien Koert Feb 27 at 1:42
0

So as it turns out, Magento doesn't move the billing address custom fields when converting the quote to the order.

I addresses this with an observer and some code to move the data

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.