Added new cols in address for export, fixed some issues in the order refund request controller, formatted the bool values to yes/no in the export files

This commit is contained in:
vishalsingh.qlo325
2025-04-29 18:52:47 +05:30
parent 4bb105ea52
commit 1e490686c1
5 changed files with 93 additions and 16 deletions

View File

@@ -157,7 +157,8 @@ class AdminCustomersControllerCore extends AdminController
'active' => 'status',
'type' => 'bool',
'orderby' => false,
'filter_key' => 'a!active'
'filter_key' => 'a!active',
'callback' => 'formatStatusAsLabel',
),
'newsletter' => array(
'title' => $this->l('Newsletter'),
@@ -242,6 +243,17 @@ class AdminCustomersControllerCore extends AdminController
}
}
public function formatStatusAsLabel($val, $row)
{
if ($val) {
$str_return = $this->l('Yes');
} else {
$str_return = $this->l('No');
}
return $str_return;
}
public function getCustomerStatusLabel($deleted, $tr)
{
if ($deleted == Customer::STATUS_DELETED) {
@@ -1061,6 +1073,14 @@ class AdminCustomersControllerCore extends AdminController
}
}
public function processExport($text_delimiter = '"')
{
$this->fields_list['newsletter']['callback'] = 'formatStatusAsLabel';
$this->fields_list['optin']['callback'] = 'formatStatusAsLabel';
return parent::processExport($text_delimiter);
}
protected function processBulkDelete()
{
// If customer is going to be deleted permanently then if customer has orders the change this customer as an anonymous customer