OpenCart 🇺🇦

Схема

public mixed index ( )

Аргументы

Аргумент Возможный тип Описание
У метода нет аргументов

Описание

Метод пока еще не документирован.

Исходный код

$this->language->load('checkout/checkout');

$this->data['text_address_existing'] = $this->language->get('text_address_existing');
$this->data['text_address_new'] = $this->language->get('text_address_new');
$this->data['text_select'] = $this->language->get('text_select');
$this->data['text_none'] = $this->language->get('text_none');

$this->data['entry_firstname'] = $this->language->get('entry_firstname');
$this->data['entry_lastname'] = $this->language->get('entry_lastname');
$this->data['entry_company'] = $this->language->get('entry_company');
$this->data['entry_company_id'] = $this->language->get('entry_company_id');
$this->data['entry_tax_id'] = $this->language->get('entry_tax_id');			
$this->data['entry_address_1'] = $this->language->get('entry_address_1');
$this->data['entry_address_2'] = $this->language->get('entry_address_2');
$this->data['entry_postcode'] = $this->language->get('entry_postcode');
$this->data['entry_city'] = $this->language->get('entry_city');
$this->data['entry_country'] = $this->language->get('entry_country');
$this->data['entry_zone'] = $this->language->get('entry_zone');

$this->data['button_continue'] = $this->language->get('button_continue');

if (isset($this->session->data['payment_address_id'])) {
	$this->data['address_id'] = $this->session->data['payment_address_id'];
} else {
	$this->data['address_id'] = $this->customer->getAddressId();
}

$this->data['addresses'] = array();

$this->load->model('account/address');

$this->data['addresses'] = $this->model_account_address->getAddresses();

$this->load->model('account/customer_group');

$customer_group_info = $this->model_account_customer_group->getCustomerGroup($this->customer->getCustomerGroupId());

if ($customer_group_info) {
	$this->data['company_id_display'] = $customer_group_info['company_id_display'];
} else {
	$this->data['company_id_display'] = '';
}

if ($customer_group_info) {
	$this->data['company_id_required'] = $customer_group_info['company_id_required'];
} else {
	$this->data['company_id_required'] = '';
}

if ($customer_group_info) {
	$this->data['tax_id_display'] = $customer_group_info['tax_id_display'];
} else {
	$this->data['tax_id_display'] = '';
}

if ($customer_group_info) {
	$this->data['tax_id_required'] = $customer_group_info['tax_id_required'];
} else {
	$this->data['tax_id_required'] = '';
}

if (isset($this->session->data['payment_country_id'])) {
	$this->data['country_id'] = $this->session->data['payment_country_id'];		
} else {
	$this->data['country_id'] = $this->config->get('config_country_id');
}

if (isset($this->session->data['payment_zone_id'])) {
	$this->data['zone_id'] = $this->session->data['payment_zone_id'];		
} else {
	$this->data['zone_id'] = '';
}

$this->load->model('localisation/country');

$this->data['countries'] = $this->model_localisation_country->getCountries();

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/payment_address.tpl')) {
	$this->template = $this->config->get('config_template') . '/template/checkout/payment_address.tpl';
} else {
	$this->template = 'default/template/checkout/payment_address.tpl';
}

$this->response->setOutput($this->render());