Merge pull request #1803 from Azhar-Webkul/gli-3085
Added : Nationality field for customers in the back-office and front-office.
This commit is contained in:
@@ -126,6 +126,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
}
|
||||
|
||||
$this->context->customer->phone = $phone;
|
||||
$this->context->customer->id_country = (int)Tools::getValue('id_nationality');
|
||||
$_POST['lastname'] = $_POST['customer_lastname'];
|
||||
$_POST['firstname'] = $_POST['customer_firstname'];
|
||||
$this->errors = array_merge($this->errors, $this->context->customer->validateController());
|
||||
@@ -549,6 +550,9 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
|
||||
$newsletter = Module::isInstalled('blocknewsletter') && Module::getInstanceByName('blocknewsletter')->active && Configuration::get('PS_CUSTOMER_NWSL');
|
||||
$this->context->smarty->assign('birthday', (bool) Configuration::get('PS_CUSTOMER_BIRTHDATE'));
|
||||
$this->context->smarty->assign('nationality', (bool) Configuration::get('PS_CUSTOMER_NATIONALITY'));
|
||||
$this->context->smarty->assign('nationality_mandatory', (bool) Configuration::get('PS_CUSTOMER_NATIONALITY_MANDATORY'));
|
||||
$this->context->smarty->assign('nationality_countries', Customer::getNationalities($this->context->language->id));
|
||||
$this->context->smarty->assign('newsletter', $newsletter);
|
||||
$this->context->smarty->assign('optin', (bool)Configuration::get('PS_CUSTOMER_OPTIN'));
|
||||
$this->context->smarty->assign('field_required', $this->context->customer->validateFieldsRequiredDatabase());
|
||||
@@ -635,6 +639,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
'id_country' => (int)$address_delivery->id_country,
|
||||
'id_state' => (int)$address_delivery->id_state,
|
||||
'id_gender' => (int)$customer->id_gender,
|
||||
'id_nationality' => (int)$customer->id_country,
|
||||
'phone' => $customer->phone,
|
||||
'sl_year' => $birthday[0],
|
||||
'sl_month' => $birthday[1],
|
||||
|
||||
Reference in New Issue
Block a user