I am new in magento.
I added an extra field in sales_flat_order table i.e.,order_campaign_params
When a customer completed its order, data is inserting into this table.
Now i want to show this attribute value in admin.
I added an extra column in admin i.e., Order Utm Source but data is not showing.
Please tell me how to show the attribute value in admin.
Please see the code for adding column
$this->addColumn('order_campaign_params', array(
'header' => Mage::helper('orderreport')->__('Order Utm Source'),
'index' => 'order_campaign_params',
'filter_index'=>'customer_entity.order_campaign_params',
'width' => '70px',
));
But how to show data of that field, Please explain.
Please see the structure:
customer_entity_varchar table
value_id entity_type_id attribute_id entity_id value
136977 1 5 43120 Sanghamitra
136978 1 7 43120 samal
136979 1 12 43120 0860142023b7a810ce66a21b68
136980 1 174 43120 data(order_compaign_params)
136981 1 3 43120 Kalazone.in
Thanks
Sales order grid is build from
sales_flat_order_gridtable. The columnorder_campaign_paramsexists insales_flat_ordertable and notsales_flat_order_gridtable.So you need to MySQL join with
sales_flat_order_gridtablesales_flat_ordertable like below:The
order_campaign_paramscolumn will now be displayed in the grid.Hope this helps.