I store my custom data in my ajax CartController issuing:
foreach ( $quote->getAllItems() as $item ) {
/* @var $item Mage_Sales_Model_Quote_Item */
$item->setMyCustomData( 'OK' );
$item->setOriginalCustomPrice( 777 );
$item->save();
}
and I want to read these data again in my Order/Pdf/Invoice.php:
foreach ($invoice->getAllItems() as $item){
Mage::log($item->getOrderItem()->getData()); // Here I wish to see my data set previously
}
The problem is I can only see the price update, but I can not see my MyCustomData
field. So I suppose that my custom data stored just as protected _data
array don't transfer from quoteItem
to orderItem
.
How to make it work? Should I rather use some another way to set my custom data?
I thought about product options
way, but I don't want to affect all the products, only particular ones.
Thanks.
sales_flat_quote_item
table calledmy_custom_data
.