Выбор города
This commit is contained in:
@@ -104,6 +104,22 @@ foreach(['name','email','telephone','address','open', 'comment'] as $item){
|
||||
$data['cart'] = $this->load->controller('common/cart');
|
||||
$data['menu'] = $this->load->controller('common/menu');
|
||||
|
||||
$this->load->model('localisation/zone');
|
||||
$country_id = $this->config->get('config_country_id');
|
||||
$zones = $this->model_localisation_zone->getZonesByCountryId($country_id);
|
||||
|
||||
$current_zone_id = isset($this->session->data['city_id']) ? (int)$this->session->data['city_id'] : (int)$this->config->get('config_zone_id');
|
||||
|
||||
$data['current_city_name'] = '';
|
||||
foreach ($zones as $zone) {
|
||||
if ($zone['zone_id'] == $current_zone_id) {
|
||||
$data['current_city_name'] = $zone['name'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$data['city_list_url'] = 'index.php?route=common/city';
|
||||
|
||||
return $this->load->view('common/header', $data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user