Fixed: The admin was unable to change the customer after any error is displayed while creating new address for the customer, also fixed the back button

This commit is contained in:
vishalsingh.qlo325
2024-05-14 11:30:19 +05:30
parent 77d48a67e9
commit 084b3c34ed
2 changed files with 4 additions and 4 deletions

View File

@@ -190,10 +190,10 @@ class AdminAddressesControllerCore extends AdminController
$token_customer = Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)$this->context->employee->id);
}
$this->fields_value['email'] = Tools::getValue('email');
$this->tpl_form_vars = array(
'customer' => isset($customer) ? $customer : null,
'tokenCustomer' => isset($token_customer) ? $token_customer : null,
'back_url' => urldecode(Tools::getValue('back'))
'customer' => (isset($customer) && $this->object->id) ? $customer : null,
'tokenCustomer' => isset($token_customer) ? $token_customer : null
);
// Order address fields depending on country format