I want to save user information in the order_item table. This information is created in a cart. So I do this as described in this post: Magento Recycle Bin Extension
I set the attribute
$installer->addAttribute('quote_item', 'final_delivery_time', $settings); $installer->addAttribute('order_item', 'final_delivery_time', $settings);
declare a set of fields in config.xml
<fieldset> <sales_convert_quote_item> <final_delivery_time> <to_order_item>final_delivery_time</to_order_item> </final_delivery_time> </sales_convert_quote_item> <sales_convert_order_item> <final_delivery_time> <to_quote_item>*</to_quote_item> <to_invoice_item>*</to_invoice_item> <to_shipment_item>*</to_shipment_item> <to_cm_item>*</to_cm_item> </final_delivery_time> </sales_convert_order_item> </fieldset>
and some code in the basket, for example
$oQuote = Mage::getSingleton('checkout/session')->getQuote(); foreach ( $oQuote->getAllItems() as $_item ) { $orderItemId = $_item->getId(); $_item->setFinalDeliveryTime('some Value'); $_item->save(); }
so I got a quote and I have a final_delivery_time field with this value in the sales_flat_quote_item table
after I placed the order in one page overview, I should also have this field in the sales_flat_order_item table, but there is nothing. The column is null. So I need the value of the field stored in order
source share