Magento Save data in sales_flat_order table
Magento Save data in sales_flat_order table : You can save/update data in magento sales_flat_order table as easily using the model sales/order.
Magento Save data in sales_flat_order table
Below is syntax to update data in magento sales_flat_order table
Syntax
$quoteItem = Mage::getModel('sales/order')->load(order_id); $quoteItem->setColumn(value); $quoteItem->save();
Where order_id is quote oder id (primary key in sales_flat_order table) used to load the row you want to update.
ColumnName : Name of column you want to update.
Value : Value You want to update.
Example
$quoteItem = Mage::getModel('sales/order')->load($orderId); $quoteItem->setStatus('Complete'); $quoteItem->save();
Advertisements