Insert column into table displayed in admin/customers.php
Posted: Wed Mar 06, 2024 9:56 am
I have this working hook to add a column to the table displayed in admin/orders.php
However the following hook for admin/customers.php only adds the column header to the table and not the detail for each line?
Code: Select all
class hook_admin_orders_columnInject {
public function listen_constructPaginator($paginator) {
$GLOBALS['table_definition']['columns'][] = [
'name' => "Company",
'class' => 'text-right',
'function' => function ($row) {
return $row['customers_company'];
},
];
}
}Code: Select all
class hook_admin_customers_columnInject {
public function listen_constructPaginator($paginator) {
$GLOBALS['table_definition']['columns'][] = [
'name' => "Company",
'class' => 'text-right',
'function' => function ($row) {
return $row['customers_company'];
},
];
}
}