OpenCart 🇺🇦

Схема

public mixed index ( )

Аргументы

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

Описание

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

Исходный код

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

$this->data['text_your_details'] = $this->language->get('text_your_details');
$this->data['text_your_address'] = $this->language->get('text_your_address');
$this->data['text_your_password'] = $this->language->get('text_your_password');
$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_email'] = $this->language->get('entry_email');
$this->data['entry_telephone'] = $this->language->get('entry_telephone');
$this->data['entry_fax'] = $this->language->get('entry_fax');
$this->data['entry_company'] = $this->language->get('entry_company');
$this->data['entry_customer_group'] = $this->language->get('entry_customer_group');
$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['entry_newsletter'] = sprintf($this->language->get('entry_newsletter'), $this->config->get('config_name'));
$this->data['entry_password'] = $this->language->get('entry_password');
$this->data['entry_confirm'] = $this->language->get('entry_confirm');
$this->data['entry_shipping'] = $this->language->get('entry_shipping');

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

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

if (is_array($this->config->get('config_customer_group_display'))) {
	$this->load->model('account/customer_group');

	$customer_groups = $this->model_account_customer_group->getCustomerGroups();

	foreach ($customer_groups  as $customer_group) {
		if (in_array($customer_group['customer_group_id'], $this->config->get('config_customer_group_display'))) {
			$this->data['customer_groups'][] = $customer_group;
		}
	}
}

$this->data['customer_group_id'] = $this->config->get('config_customer_group_id');

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

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

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

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

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

if ($this->config->get('config_account_id')) {
	$this->load->model('catalog/information');

	$information_info = $this->model_catalog_information->getInformation($this->config->get('config_account_id'));

	if ($information_info) {
		$this->data['text_agree'] = sprintf($this->language->get('text_agree'), $this->url->link('information/information/info', 'information_id=' . $this->config->get('config_account_id'), 'SSL'), $information_info['title'], $information_info['title']);
	} else {
		$this->data['text_agree'] = '';
	}
} else {
	$this->data['text_agree'] = '';
}

$this->data['shipping_required'] = $this->cart->hasShipping();

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

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