I want to save custom information in order_item-table. These information where created in cart. So I do it like described in this post.
I have installed the attribute:
$installer->addAttribute('quote_item', 'final_delivery_time', $settings);
$installer->addAttribute('order_item', 'final_delivery_time', $settings);
declare the fieldset 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 cart 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 my field final_delivery_time with this value in the sales_flat_quote_item table
After I place the order in onepage-review, I should also have this field in the sales_flat_order_item table, but there is nothing. In the column stands null.
So I need the value of the field saved in the order.