<?PHP
class ControllerInformationPvz extends Controller {
public function index() {
$this->language->load('information/pvz');
$this->document->setTitle($this->language->get('heading_title'));
/* Начало добавление альтернативной канонической ссылки */
if ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == '1' || $_SERVER['HTTPS'])) || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && (strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') || (!empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on'))) { $http_prot = HTTPS_SERVER_1;
} else {
$http_prot = HTTP_SERVER_1;
}
if ($this->url->link('information/pvz') !== $http_prot . $_SERVER['REQUEST_URI'] || $this->url->link('information/pvz') !== $http_prot . $_SERVER['REQUEST_URI'] && isset($this->request->get['page'])) { $this->document->addLink($this->url->link('information/pvz'), 'canonical');
$this->document->setRobots('noindex, follow');
}
/* Конец добавление альтернативной канонической ссылки */
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['text_index'] = $this->language->get('text_index');
$this->data['text_empty'] = $this->language->get('text_empty');
$this->data['index_url'] = $this->url->link('information/pvz');
$this->data['button_continue'] = $this->language->get('button_continue');
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'),
'text_breadcrumbs_title' => $this->language->get('text_breadcrumbs_title'),
'href' => $this->url->link('common/home'),
'separator' => false
);
$this->data['breadcrumbs'][] = array( 'text' => $this->language->get('text_brand'),
'text_breadcrumbs_title' => $this->language->get('text_brand'),
'href' => $this->url->link('information/pvz'),
'separator' => $this->language->get('text_separator')
);
$this->data['categories'] = array();
if (file_exists('catalog/view/javascript/downloadJs/pvz_list.xml')) { } else {
}
$results = $xml->Pvz;
foreach ($results as $result) {
$key = '0 - 9';
} else {
}
if (!isset($this->data['pvzes'][$key])) { $this->data['categories'][$key]['city'] = $key;
}
$this->data['categories'][$key]['pvz'][] = array( 'code' => $result['Code'],
'city' => $result['City'],
'name' => $result['Name'],
'address' => $result['Address'],
'phone' => $result['Phone'],
'email' => $result['Email'],
'work_time' => $result['WorkTime'],
'coord_x' => $result['coordX'],
'coord_y' => $result['coordY']
);
}
asort($this->data['categories']);
$this->data['continue'] = $this->url->link('common/home');
if (file_exists(DIR_TEMPLATE
. $this->config->get('config_template') . '/template/information/pvz_list.tpl')) { $this->template = $this->config->get('config_template') . '/template/information/pvz_list.tpl';
} else {
$this->template = 'default/template/information/pvz_list.tpl';
}
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);
$this->response->setOutput($this->render());
}
}
?>