OpenCart 🇺🇦

Схема

public mixed subscription ( )

Аргументы

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

Описание

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

Исходный код

$this->data = array_merge($this->data, $this->load->language('openbay/amazon_subscription'));

$this->document->setTitle($this->language->get('lang_title'));
$this->document->addStyle('view/stylesheet/openbay.css');
$this->document->addScript('view/javascript/openbay/faq.js');

$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array(
	'href'      => HTTPS_SERVER . 'index.php?route=common/home&token=' . $this->session->data['token'],
	'text'      => $this->language->get('text_home'),
	'separator' => false
);
$this->data['breadcrumbs'][] = array(
	'href'      => HTTPS_SERVER . 'index.php?route=extension/openbay&token=' . $this->session->data['token'],
	'text'      => $this->language->get('lang_openbay'),
	'separator' => ' :: '
);
$this->data['breadcrumbs'][] = array(
	'href'      => HTTPS_SERVER . 'index.php?route=openbay/amazon/overview&token=' . $this->session->data['token'],
	'text'      => $this->language->get('lang_overview'),
	'separator' => ' :: '
);

$this->data['breadcrumbs'][] = array(
	'href'      => HTTPS_SERVER . 'index.php?route=openbay/amazon/subscription&token=' . $this->session->data['token'],
	'text'      => $this->language->get('lang_my_account'),
	'separator' => ' :: '
);

$this->data['link_overview'] = $this->url->link('openbay/amazon/overview', 'token=' . $this->session->data['token'], 'SSL');

$response = simplexml_load_string($this->openbay->amazon->callWithResponse('plans/getPlans'));

$plans = array();

if ($response) {
	foreach ($response->Plan as $plan) {
		$plans[] = array(
			'title' => (string)$plan->Title,
			'description' => (string)$plan->Description,
			'order_frequency' => (string)$plan->OrderFrequency,
			'product_listings' => (string)$plan->ProductListings,
			'bulk_listing' => (string)$plan->BulkListing,
			'price' => (string)$plan->Price,
		);
	}
}

$this->data['plans'] = $plans;

$response = simplexml_load_string($this->openbay->amazon->callWithResponse('plans/getUsersPlans'));

$plan = false;

if ($response) {
	$plan = array(
		'merchant_id' => (string)$response->MerchantId,
		'user_status' => (string)$response->UserStatus,
		'title' => (string)$response->Title,
		'description' => (string)$response->Description,
		'price' => (string)$response->Price,
		'order_frequency' => (string)$response->OrderFrequency,
		'product_listings' => (string)$response->ProductListings,
		'listings_remain' => (string)$response->ListingsRemain,
		'listings_reserved' => (string)$response->ListingsReserved,
		'bulk_listing' => (string)$response->BulkListing,
	);
}

$this->data['user_plan'] = $plan;
$this->data['server'] = $this->openbay->amazon->getServer();
$this->data['token'] = $this->config->get('openbay_amazon_token');

$this->template = 'openbay/amazon_subscription.tpl';
$this->children = array(
	'common/header',
	'common/footer'
);
$this->response->setOutput($this->render());