1

Both tables have the same custom field added to it. I have an observer listening for "sales_quote_item_set_product". I'm setting the field like this:

$quoteItem->setData("custom_code", "TEST");

If I go to sales_flat_quote_item, I can see the custom_code field being populated with "TEST". Once I place the order, the corresponding entry in sales_flat_order_item still has custom_code==null.

Do I need to listen for another event? Is there one like sales_order_item_set_product? I searched around and didn't see anything.

1 Answer 1

3

I figured it out. I needed to add this to my extensions config.xml file:

    <fieldsets>
        <sales_convert_quote_item>
            <custom_attribute>
                <to_order_item>*</to_order_item>
            </custom_attribute>
        </sales_convert_quote_item>
        <sales_convert_order_item>
            <custom_attribute>
                <to_quote_item>*</to_quote_item>
            </custom_attribute>
        </sales_convert_order_item>
    </fieldsets>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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