4

I have added a extra column in sales_flat_quote_item table. Populating the column during checkout works fine. But showing the values of the extra column on the order details page in admin does not work. I also would like to show the extra column in the order confirmation email.

can you please tell me how to get the data from the column in these places?

1 Answer 1

1

The problem is, that the quote and the order are two different things.

To get the value, when the order is created, you have to transfer the value from the quote to the order.

  1. add the same "attribute" to the order as well (I recommend to use Mage_Sales_Model_Entity_Setup for creating the new columns)
  2. add the conversion to the config.xml

    <fieldsets>
        <sales_convert_quote>
            <custom_attribute>
                <to_order>*</to_order>
            </custom_attribute>
        </sales_convert_quote>
        <sales_convert_order>
            <custom_attribute>
                <to_quote>*</to_quote>
            </custom_attribute>
        </sales_convert_order>
    </fieldsets>
    

More on this at atwix.

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.