From 42e6a617a0ebf13d52407ba46b183018c97ad364 Mon Sep 17 00:00:00 2001 From: Michel Date: Fri, 26 Jan 2018 19:49:35 -0200 Subject: [PATCH] Add multi store support. --- injected.php | 16 +++++++++++++++- install.xml | 29 +++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/injected.php b/injected.php index 9126247..d173e47 100644 --- a/injected.php +++ b/injected.php @@ -1,2 +1,16 @@ $this->config->get('config_name'), + 'href' => HTTP_CATALOG +]; + +$this->load->model('setting/store'); + +$results = $this->model_setting_store->getStores(); + +foreach ($results as $result) { + $data['stores'][] = [ + 'name' => $result['name'], + 'href' => $result['url'] + ]; +} diff --git a/install.xml b/install.xml index 777c93a..812a8cc 100644 --- a/install.xml +++ b/install.xml @@ -9,7 +9,23 @@ load->view('common/column_left', $data);]]> - + $this->config->get('config_name'), + 'href' => HTTP_CATALOG + ]; + + $this->load->model('setting/store'); + + $results = $this->model_setting_store->getStores(); + + foreach ($results as $result) { + $data['stores'][] = [ + 'name' => $result['name'], + 'href' => $result['url'] + ]; + } + ]]> @@ -20,12 +36,13 @@ - - - Your store + {% for store in stores %} + + + {% endfor %} ]]>