Question

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

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top