Sarthak  Gupta
Sarthak Gupta

Reputation: 654

Creating Custom Field for Orders in Magento Admin

We sell on a lot of marketplaces like Amazon, ebay etc and each day all the orders received are fed into Magento through admin backend as our main website runs on Magento. At the moment to map an amazon order to magento's order number we enter amazon's order number in the comments section of the order which is problematic as it does not shows in the orders grid as well as in the exported sheets.

How can I get a custom attribute field in the admin section while creating a new order where I can enter the Amazon's order number and have it shown in the orders grid as well as in the exported sheets.

Upvotes: 0

Views: 948

Answers (1)

In app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php, add comment column as follows in _prepareColumns() function

$this->addColumn('ordercomment', array(
    'header'       => Mage::helper('ordercomment')->__('Order Comment'),
    'index'        => 'ordercomment',
    'filter_index' => 'ordercomment_table.comment',
));

Upvotes: 1

Related Questions