OpenCart 🇺🇦

Схема

public mixed address ( )

Аргументы

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

Описание

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

Исходный код

if ($this->config->get('amazon_checkout_mode') == 'sandbox') {
	$amazon_payment_js = 'https://static-eu.payments-amazon.com/cba/js/gb/sandbox/PaymentWidgets.js';
} elseif ($this->config->get('amazon_checkout_mode') == 'live') {
	$amazon_payment_js = 'https://static-eu.payments-amazon.com/cba/js/gb/PaymentWidgets.js';
}

$this->document->addScript($amazon_payment_js);

// CBA supports up to 50 distinct products
if (count($this->cart->getProducts()) > 50) {
	$this->redirect($this->url->link('common/home'));
}

// CBA does not allow to process orders with a total of 0.00
if (count($this->cart->getTotal()) == 0) {
	$this->redirect($this->url->link('common/home'));
}

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

$this->document->setTitle($this->language->get('heading_title'));

if (isset($this->request->get['contract_id'])) {
	$this->session->data['cba']['contract_id'] = $this->request->get['contract_id'];
} elseif (!isset($this->session->data['cba']['contract_id']) || empty($this->session->data['cba']['contract_id'])) {
	$this->redirect($this->url->link('common/home'));
}

$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['heading_address'] = $this->language->get('heading_address');
$this->data['text_back'] = $this->language->get('text_back');
$this->data['text_cart'] = $this->language->get('text_cart');
$this->data['text_continue'] = $this->language->get('text_continue');
$this->data['error_shipping'] = $this->language->get('error_shipping');
$this->data['error_shipping_address'] = $this->language->get('error_shipping_address');
$this->data['error_shipping_methods'] = $this->language->get('error_shipping_methods');
$this->data['error_no_shipping_methods'] = $this->language->get('error_no_shipping_methods');

$this->data['merchant_id'] = $this->config->get('amazon_checkout_merchant_id');
$this->data['amazon_payment'] = $this->url->link('payment/amazon_checkout/payment', '', 'SSL');
$this->data['shipping_quotes'] = $this->url->link('payment/amazon_checkout/shipping_quotes', '', 'SSL');
$this->data['payment_method'] = $this->url->link('payment/amazon_checkout/payment_method', '', 'SSL');

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

$this->data['cart'] = $this->url->link('checkout/cart');
$this->data['text_cart'] = $this->language->get('text_cart');

$this->children = array(
	'common/column_left',
	'common/column_right',
	'common/content_top',
	'common/content_bottom',
	'common/footer',
	'common/header'
);

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