1
Template Support / Adding a new column in Orders section of admin panel.
« on: July 30, 2014, 05:13:17 AM »
Hi.
I want to add a new column in Orders section of admin panel. This section shows order related information in JQGRID. I want to add a column showing payment method of order. I edited the following code in order.php inside the controller.
$grid_settings['colNames'] = array(
$this->language->get('column_order'),
$this->language->get('column_name'),
$this->language->get('column_status'),
$this->language->get('column_mode'), //Column Name that I added
$this->language->get('column_date_added'),
$this->language->get('column_total'),
);
$grid_settings['colModel'] = array(
array('name' => 'order_id',
'index' => 'order_id',
'align' => 'center',),
array('name' => 'name',
'index' => 'name',
'align' => 'center'),
array('name' => 'status',
'index' => 'status',
'align' => 'center',
'search' => false),
array('name' => 'payment_method', //Column data that I added
'index' => 'payment_method',
'align' => 'center',
'search' => false),
array('name' => 'date_added',
'index' => 'date_added',
'align' => 'center',
'search' => false),
array('name' => 'total',
'index' => 'total',
'align' => 'center'),
);
This added the column name but did not fetch any data to that column.
Please do help me with this. I am stucked onto this for long.
Thanks in advance.
I want to add a new column in Orders section of admin panel. This section shows order related information in JQGRID. I want to add a column showing payment method of order. I edited the following code in order.php inside the controller.
$grid_settings['colNames'] = array(
$this->language->get('column_order'),
$this->language->get('column_name'),
$this->language->get('column_status'),
$this->language->get('column_mode'), //Column Name that I added
$this->language->get('column_date_added'),
$this->language->get('column_total'),
);
$grid_settings['colModel'] = array(
array('name' => 'order_id',
'index' => 'order_id',
'align' => 'center',),
array('name' => 'name',
'index' => 'name',
'align' => 'center'),
array('name' => 'status',
'index' => 'status',
'align' => 'center',
'search' => false),
array('name' => 'payment_method', //Column data that I added
'index' => 'payment_method',
'align' => 'center',
'search' => false),
array('name' => 'date_added',
'index' => 'date_added',
'align' => 'center',
'search' => false),
array('name' => 'total',
'index' => 'total',
'align' => 'center'),
);
This added the column name but did not fetch any data to that column.
Please do help me with this. I am stucked onto this for long.
Thanks in advance.