I want to create a field "add gift to this order" similar to "Order History->Order Comments" on create order page of admin.
I have tried this : https://stackoverflow.com/questions/12936470/adding-a-new-attribute-to-order-in-magento and some other tutorials.
EDITED :
I have put the following code in /app/design/adminhtml/default/default/template/sales/order/create/comment.phtml
<textarea style="width:98%; height:8em;" id="order-freegift" name="order[freegift][freegift_note]" rows="2" cols="15"><?php echo $this->getFreegiftNote() ?></textarea>
and created a function in core file which is not recommended : /app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php I have modified this file only for testing purpose.
public function getFreegiftNote()
{
return $this->escapeHtml($this->getQuote()->getCustomerNote());
}
Then I created an order with free gift 'xyz' from admin. How can I get this gift on the Order View Page? In which table this custom attribute value is saved? For this I have looked into all tables of 'sales_order' but not found the gift 'xyz'.