store.php (1098B)
1 <?php 2 class ControllerExtensionModuleStore extends Controller { 3 public function index() { 4 $status = true; 5 6 if ($this->config->get('module_store_admin')) { 7 $this->user = new Cart\User($this->registry); 8 9 $status = $this->user->isLogged(); 10 } 11 12 if ($status) { 13 $this->load->language('extension/module/store'); 14 15 $data['store_id'] = $this->config->get('config_store_id'); 16 17 $data['stores'] = array(); 18 19 $data['stores'][] = array( 20 'store_id' => 0, 21 'name' => $this->language->get('text_default'), 22 'url' => HTTP_SERVER . 'index.php?route=common/home&session_id=' . $this->session->getId() 23 ); 24 25 $this->load->model('setting/store'); 26 27 $results = $this->model_setting_store->getStores(); 28 29 foreach ($results as $result) { 30 $data['stores'][] = array( 31 'store_id' => $result['store_id'], 32 'name' => $result['name'], 33 'url' => $result['url'] . 'index.php?route=common/home&session_id=' . $this->session->getId() 34 ); 35 } 36 37 return $this->load->view('extension/module/store', $data); 38 } 39 } 40 }