From a55b5271e75fe50b4ddca42d054854edf3cbb530 Mon Sep 17 00:00:00 2001 From: Daniel kerr Date: Thu, 25 Sep 2014 01:57:29 +0800 Subject: [PATCH] more module changes done --- .../selenium/catalog/AmazonPaymentsTest.php | 2 +- .../selenium/catalog/PayPalExpressTest.php | 2 +- .../selenium/catalog/SagePayDirectTest.php | 2 +- upload/admin/controller/design/layout.php | 51 ++++++++----------- upload/admin/controller/extension/module.php | 4 ++ ..._checkout_layout.php => amazon_button.php} | 18 +++---- upload/admin/controller/module/banner.php | 28 ++++++---- upload/admin/controller/module/bestseller.php | 26 ++++++---- upload/admin/controller/module/carousel.php | 26 +++++++--- upload/admin/controller/module/featured.php | 26 ++++++---- upload/admin/controller/module/html.php | 22 +++++--- upload/admin/controller/module/latest.php | 24 ++++++--- .../module/{pp_layout.php => pp_button.php} | 20 ++++---- upload/admin/controller/module/slideshow.php | 23 ++++++--- upload/admin/controller/module/special.php | 26 ++++++---- ..._checkout_layout.php => amazon_button.php} | 0 .../module/{pp_layout.php => pp_button.php} | 0 upload/admin/model/design/layout.php | 4 +- upload/admin/model/extension/module.php | 22 -------- .../view/template/design/layout_form.tpl | 33 +++--------- ..._checkout_layout.tpl => amazon_button.tpl} | 4 +- upload/admin/view/template/module/banner.tpl | 36 ++++++------- .../admin/view/template/module/bestseller.tpl | 35 ++++++------- .../admin/view/template/module/carousel.tpl | 43 ++++++++-------- .../admin/view/template/module/featured.tpl | 35 ++++++------- upload/admin/view/template/module/html.tpl | 10 ++-- upload/admin/view/template/module/latest.tpl | 33 ++++++------ .../module/{pp_layout.tpl => pp_button.tpl} | 4 +- .../admin/view/template/module/slideshow.tpl | 35 ++++++------- upload/admin/view/template/module/special.tpl | 33 ++++++------ .../catalog/controller/common/column_left.php | 15 ++++++ .../module/amazon_checkout_layout.php | 6 +-- .../catalog/controller/module/pp_layout.php | 6 +-- upload/catalog/model/design/layout.php | 10 +--- upload/install/opencart.sql | 27 ++-------- 35 files changed, 340 insertions(+), 351 deletions(-) rename upload/admin/controller/module/{amazon_checkout_layout.php => amazon_button.php} (74%) rename upload/admin/controller/module/{pp_layout.php => pp_button.php} (78%) rename upload/admin/language/english/module/{amazon_checkout_layout.php => amazon_button.php} (100%) rename upload/admin/language/english/module/{pp_layout.php => pp_button.php} (100%) delete mode 100644 upload/admin/model/extension/module.php rename upload/admin/view/template/module/{amazon_checkout_layout.tpl => amazon_button.tpl} (92%) rename upload/admin/view/template/module/{pp_layout.tpl => pp_button.tpl} (94%) diff --git a/tests/phpunit/selenium/catalog/AmazonPaymentsTest.php b/tests/phpunit/selenium/catalog/AmazonPaymentsTest.php index 52ef2296092..8df5e156c70 100644 --- a/tests/phpunit/selenium/catalog/AmazonPaymentsTest.php +++ b/tests/phpunit/selenium/catalog/AmazonPaymentsTest.php @@ -96,7 +96,7 @@ public function setUpPage() { $this->byCssSelector('.fa-plus-circle')->click(); for ($i = 1; ; $i++) { - $element = $this->byCssSelector('select[name="amazon_checkout_layout_module[0][layout_id]"] option:nth-child(' . $i . ')'); + $element = $this->byCssSelector('select[name="amazon_button_module[0][layout_id]"] option:nth-child(' . $i . ')'); if ($element->text() == 'Cart') { $element->click(); diff --git a/tests/phpunit/selenium/catalog/PayPalExpressTest.php b/tests/phpunit/selenium/catalog/PayPalExpressTest.php index 18a06a1c43b..490ebd0ab07 100644 --- a/tests/phpunit/selenium/catalog/PayPalExpressTest.php +++ b/tests/phpunit/selenium/catalog/PayPalExpressTest.php @@ -124,7 +124,7 @@ public function setUpPage() { $this->byCssSelector('.fa-plus-circle')->click(); for ($i = 1; ; $i++) { - $element = $this->byCssSelector("select[name=\"pp_layout_module[0][layout_id]\"] option:nth-child($i)"); + $element = $this->byCssSelector("select[name=\"pp_button_module[0][layout_id]\"] option:nth-child($i)"); if ($element->text() == 'Cart') { $element->click(); diff --git a/tests/phpunit/selenium/catalog/SagePayDirectTest.php b/tests/phpunit/selenium/catalog/SagePayDirectTest.php index 044f8738aab..1d8bacadd31 100644 --- a/tests/phpunit/selenium/catalog/SagePayDirectTest.php +++ b/tests/phpunit/selenium/catalog/SagePayDirectTest.php @@ -104,7 +104,7 @@ public function setUpPage() { $this->byCssSelector('.fa-plus-circle')->click(); for ($i = 1; ; $i++) { - $element = $this->byCssSelector("select[name=\"pp_layout_module[0][layout_id]\"] option:nth-child($i)"); + $element = $this->byCssSelector("select[name=\"pp_button_module[0][layout_id]\"] option:nth-child($i)"); if ($element->text() == 'Cart') { $element->click(); diff --git a/upload/admin/controller/design/layout.php b/upload/admin/controller/design/layout.php index 3ed4ada4823..1c6b79f9984 100644 --- a/upload/admin/controller/design/layout.php +++ b/upload/admin/controller/design/layout.php @@ -360,50 +360,41 @@ protected function getForm() { $this->load->model('extension/extension'); - $this->load->model('extension/module'); $data['modules'] = array(); // Get a list of installed modules $extensions = $this->model_extension_extension->getInstalled('module'); - - foreach ($extensions as $code) { - if (!$this->config->has($code . '_module')) { - $this->load->language('module/' . $code); - $data['modules'][] = array( - 'name' => $this->language->get('heading_title'), - 'code' => $code, - 'module' => '' - ); - } - } - // Add all the modules which have multiple settings for each module foreach ($extensions as $code) { - if ($this->config->has($code . '_module')) { - $this->load->language('module/' . $code); + $this->load->language('module/' . $code); + + $i = 1; - $i = 1; - - $module_data = array(); - - $modules = $this->model_extension_module->getModules($code); + $module_data = array(); + + if ($this->config->has($code . '_module')) { + $modules = $this->config->get($code . '_module'); - foreach ($modules as $module) { + foreach (array_keys($modules) as $key) { $module_data[] = array( 'name' => $this->language->get('heading_title') . ' ' . $i++, - 'code' => $code . '.' . $module['module_id'] - ); - } - - if ($module_data) { - $data['modules'][] = array( - 'name' => $this->language->get('heading_title'), - 'code' => $code, - 'module' => $module_data + 'code' => $code . '.' . $key ); } + } else { + $module_data[] = array( + 'name' => $this->language->get('heading_title'), + 'code' => $code + ); + } + + if ($module_data) { + $data['modules'][] = array( + 'name' => $this->language->get('heading_title'), + 'module' => $module_data + ); } } diff --git a/upload/admin/controller/extension/module.php b/upload/admin/controller/extension/module.php index 9be215038a1..65cd3899181 100644 --- a/upload/admin/controller/extension/module.php +++ b/upload/admin/controller/extension/module.php @@ -52,6 +52,10 @@ public function uninstall() { $this->model_setting_setting->deleteSetting($this->request->get['extension']); + $this->load->model('extension/module'); + + $this->model_extension_module->deleteModule($this->request->get['extension']); + // Call uninstall method if it exsits $this->load->controller('module/' . $this->request->get['extension'] . '/uninstall'); diff --git a/upload/admin/controller/module/amazon_checkout_layout.php b/upload/admin/controller/module/amazon_button.php similarity index 74% rename from upload/admin/controller/module/amazon_checkout_layout.php rename to upload/admin/controller/module/amazon_button.php index 7a3fa428b12..46b402ab12d 100644 --- a/upload/admin/controller/module/amazon_checkout_layout.php +++ b/upload/admin/controller/module/amazon_button.php @@ -1,14 +1,14 @@ language->load('module/amazon_checkout_layout'); + $this->language->load('module/amazon_button'); $this->document->setTitle($this->language->get('heading_title')); $this->load->model('setting/setting'); if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { - $this->model_setting_setting->editSetting('amazon_checkout_layout', $this->request->post); + $this->model_setting_setting->editSetting('amazon_button', $this->request->post); $this->session->data['success'] = $this->language->get('text_success'); @@ -48,25 +48,25 @@ public function index() { $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), - 'href' => $this->url->link('module/amazon_checkout_layout', 'token=' . $this->session->data['token'], 'SSL'), + 'href' => $this->url->link('module/amazon_button', 'token=' . $this->session->data['token'], 'SSL'), 'separator' => ' :: ' ); - $data['action'] = $this->url->link('module/amazon_checkout_layout', 'token=' . $this->session->data['token'], 'SSL'); + $data['action'] = $this->url->link('module/amazon_button', 'token=' . $this->session->data['token'], 'SSL'); $data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'); - if (isset($this->request->post['amazon_checkout_layout_status'])) { - $data['amazon_checkout_layout_status'] = $this->request->post['amazon_checkout_layout_status']; + if (isset($this->request->post['amazon_button_status'])) { + $data['amazon_button_status'] = $this->request->post['amazon_button_status']; } else { - $data['amazon_checkout_layout_status'] = $this->config->get('amazon_checkout_layout_status'); + $data['amazon_button_status'] = $this->config->get('amazon_button_status'); } $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); - $this->response->setOutput($this->load->view('module/amazon_checkout_layout.tpl', $data)); + $this->response->setOutput($this->load->view('module/amazon_button.tpl', $data)); } protected function validate() { diff --git a/upload/admin/controller/module/banner.php b/upload/admin/controller/module/banner.php index 133b0539fd6..5aeb4f1db4c 100644 --- a/upload/admin/controller/module/banner.php +++ b/upload/admin/controller/module/banner.php @@ -9,14 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('banner', $this->request->post); - // We need to add modules to a separate table - $this->model_extension_module->addModule('banner', $this->request->post['module']); - $this->session->data['success'] = $this->language->get('text_success'); $this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL')); @@ -78,10 +73,23 @@ public function index() { $data['banner_status'] = $this->config->get('banner_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['banner_module'])) { + $modules = $this->request->post['banner_module']; + } elseif ($this->config->has('banner_module')) { + $modules = $this->config->get('banner_module'); } else { - $data['modules'] = $this->extension_module->getModules('banner'); + $modules = array(); + } + + $data['banner_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['banner_modules'][] = array( + 'key' => $key, + 'banner_id' => $module['banner_id'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $this->load->model('design/banner'); @@ -100,8 +108,8 @@ protected function validate() { $this->error['warning'] = $this->language->get('error_permission'); } - if (isset($this->request->post['banner_module'])) { - foreach ($this->request->post['banner_module'] as $key => $value) { + if (isset($this->request->post['module'])) { + foreach ($this->request->post['module'] as $key => $value) { if (!$value['width'] || !$value['height']) { $this->error['dimension'][$key] = $this->language->get('error_dimension'); } diff --git a/upload/admin/controller/module/bestseller.php b/upload/admin/controller/module/bestseller.php index ec7ec4f5fca..79967e9e203 100644 --- a/upload/admin/controller/module/bestseller.php +++ b/upload/admin/controller/module/bestseller.php @@ -9,14 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('bestseller', $this->request->post['bestseller_status']); - // We need to add modules to a table - $this->model_extension_module->addModule('bestseller', $this->request->post['module']); - $this->cache->delete('product'); $this->session->data['success'] = $this->language->get('text_success'); @@ -80,12 +75,25 @@ public function index() { $data['bestseller_status'] = $this->config->get('bestseller_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['bestseller_module'])) { + $modules = $this->request->post['bestseller_module']; + } elseif ($this->config->has('bestseller_module')) { + $modules = $this->config->get('bestseller_module'); } else { - $data['modules'] = $this->extension_module->getModules('bestseller'); + $modules = array(); } - + + $data['bestseller_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['bestseller_modules'][] = array( + 'key' => $key, + 'limit' => $module['limit'], + 'width' => $module['width'], + 'height' => $module['height'] + ); + } + $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); diff --git a/upload/admin/controller/module/carousel.php b/upload/admin/controller/module/carousel.php index 2063fda5ce5..d425ad32c9c 100644 --- a/upload/admin/controller/module/carousel.php +++ b/upload/admin/controller/module/carousel.php @@ -9,13 +9,8 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('carousel', $this->request->post); - - // We need to add modules to a table - $this->model_extension_module->addModule('bestseller', $this->request->post['module']); $this->session->data['success'] = $this->language->get('text_success'); @@ -80,10 +75,25 @@ public function index() { $data['carousel_status'] = $this->config->get('carousel_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['carousel_module'])) { + $modules = $this->request->post['carousel_module']; + } elseif ($this->config->has('carousel_module')) { + $modules = $this->config->get('carousel_module'); } else { - $data['modules'] = $this->extension_module->getModules('carousel'); + $modules = array(); + } + + $data['carousel_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['carousel_modules'][] = array( + 'key' => $key, + 'banner_id' => $module['banner_id'], + 'limit' => $module['limit'], + 'scroll' => $module['scroll'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $this->load->model('design/banner'); diff --git a/upload/admin/controller/module/featured.php b/upload/admin/controller/module/featured.php index fbdf21c2f58..69308c961a5 100644 --- a/upload/admin/controller/module/featured.php +++ b/upload/admin/controller/module/featured.php @@ -9,13 +9,8 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('featured', $this->request->post); - - // We need to add modules to a table - $this->model_extension_module->addModule('featured', $this->request->post['module']); $this->session->data['success'] = $this->language->get('text_success'); @@ -109,13 +104,26 @@ public function index() { } else { $data['featured_status'] = $this->config->get('featured_status'); } - - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + + if (isset($this->request->post['featured_module'])) { + $modules = $this->request->post['featured_module']; + } elseif ($this->config->has('featured_module')) { + $modules = $this->config->get('featured_module'); } else { - $data['modules'] = $this->extension_module->getModules('featured'); + $modules = array(); } + $data['featured_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['featured_modules'][] = array( + 'key' => $key, + 'limit' => $module['limit'], + 'width' => $module['width'], + 'height' => $module['height'] + ); + } + $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); diff --git a/upload/admin/controller/module/html.php b/upload/admin/controller/module/html.php index 81253bdca0a..79606338a23 100644 --- a/upload/admin/controller/module/html.php +++ b/upload/admin/controller/module/html.php @@ -9,13 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('html', $this->request->post); - $this->model_extension_module->addModule('html', $this->request->post['module']); - $this->session->data['success'] = $this->language->get('text_success'); $this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL')); @@ -71,10 +67,22 @@ public function index() { $data['html_status'] = $this->config->get('html_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['html_module'])) { + $modules = $this->request->post['html_module']; + } elseif ($this->config->has('html_module')) { + $modules = $this->config->get('html_module'); } else { - $data['modules'] = $this->extension_module->getModules('html'); + $modules = array(); + } + + $data['html_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['html_modules'][] = array( + 'key' => $key, + 'heading' => $module['heading'], + 'description' => $module['description'] + ); } $this->load->model('localisation/language'); diff --git a/upload/admin/controller/module/latest.php b/upload/admin/controller/module/latest.php index d4681b4c382..4fa82d02106 100644 --- a/upload/admin/controller/module/latest.php +++ b/upload/admin/controller/module/latest.php @@ -9,14 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('latest', $this->request->post); - // We need to add modules to a table - $this->model_extension_module->addModule('latest', $this->request->post['module']); - $this->cache->delete('product'); $this->session->data['success'] = $this->language->get('text_success'); @@ -80,10 +75,23 @@ public function index() { $data['latest_status'] = $this->config->get('latest_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['latest_module'])) { + $modules = $this->request->post['latest_module']; + } elseif ($this->config->has('latest_module')) { + $modules = $this->config->get('latest_module'); } else { - $data['modules'] = $this->model_extension_module->getModules('latest'); + $modules = array(); + } + + $data['latest_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['latest_modules'][] = array( + 'key' => $key, + 'limit' => $module['limit'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $data['header'] = $this->load->controller('common/header'); diff --git a/upload/admin/controller/module/pp_layout.php b/upload/admin/controller/module/pp_button.php similarity index 78% rename from upload/admin/controller/module/pp_layout.php rename to upload/admin/controller/module/pp_button.php index 1bbee7139fa..4b8b5421650 100644 --- a/upload/admin/controller/module/pp_layout.php +++ b/upload/admin/controller/module/pp_button.php @@ -1,14 +1,14 @@ language->load('module/pp_layout'); + $this->language->load('module/pp_button'); $this->load->model('setting/setting'); $this->document->setTitle($this->language->get('heading_title')); if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { - $this->model_setting_setting->editSetting('pp_layout', $this->request->post); + $this->model_setting_setting->editSetting('pp_button', $this->request->post); $this->session->data['success'] = $this->language->get('text_success'); @@ -46,28 +46,28 @@ public function index() { $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), - 'href' => $this->url->link('module/pp_layout', 'token=' . $this->session->data['token'], 'SSL') + 'href' => $this->url->link('module/pp_button', 'token=' . $this->session->data['token'], 'SSL') ); - $data['action'] = $this->url->link('module/pp_layout', 'token=' . $this->session->data['token'], 'SSL'); + $data['action'] = $this->url->link('module/pp_button', 'token=' . $this->session->data['token'], 'SSL'); $data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'); - if (isset($this->request->post['pp_layout_status'])) { - $data['pp_layout_status'] = $this->request->post['pp_layout_status']; + if (isset($this->request->post['pp_button_status'])) { + $data['pp_button_status'] = $this->request->post['pp_button_status']; } else { - $data['pp_layout_status'] = $this->config->get('pp_layout_status'); + $data['pp_button_status'] = $this->config->get('pp_button_status'); } $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); - $this->response->setOutput($this->load->view('module/pp_layout.tpl', $data)); + $this->response->setOutput($this->load->view('module/pp_button.tpl', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'module/pp_layout')) { + if (!$this->user->hasPermission('modify', 'module/pp_button')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/module/slideshow.php b/upload/admin/controller/module/slideshow.php index f7f52dfca82..7dbca11f67d 100644 --- a/upload/admin/controller/module/slideshow.php +++ b/upload/admin/controller/module/slideshow.php @@ -9,13 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('slideshow', $this->request->post); - $this->model_extension_module->addModule('slideshow', $this->request->post['module']); - $this->session->data['success'] = $this->language->get('text_success'); $this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL')); @@ -77,10 +73,23 @@ public function index() { $data['slideshow_status'] = $this->config->get('slideshow_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['slideshow_module'])) { + $modules = $this->request->post['slideshow_module']; + } elseif ($this->config->has('slideshow_module')) { + $modules = $this->config->get('slideshow_module'); } else { - $data['modules'] = $this->model_extension_module->getModules('latest'); + $modules = array(); + } + + $data['slideshow_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['slideshow_modules'][] = array( + 'key' => $key, + 'banner_id' => $module['banner_id'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $this->load->model('design/banner'); diff --git a/upload/admin/controller/module/special.php b/upload/admin/controller/module/special.php index c5b12259f1f..2846d4cc308 100644 --- a/upload/admin/controller/module/special.php +++ b/upload/admin/controller/module/special.php @@ -9,13 +9,8 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('special', $this->request->post); - - // We need to add modules to a table - $this->model_extension_module->addModule('special', $this->request->post['module']); $this->cache->delete('product'); @@ -79,11 +74,24 @@ public function index() { } else { $data['special_status'] = $this->config->get('special_status'); } - - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + + if (isset($this->request->post['special_module'])) { + $modules = $this->request->post['special_module']; + } elseif ($this->config->has('special_module')) { + $modules = $this->config->get('special_module'); } else { - $data['modules'] = $this->model_extension_module->getModules('special'); + $modules = array(); + } + + $data['special_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['special_modules'][] = array( + 'key' => $key, + 'limit' => $module['limit'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $data['header'] = $this->load->controller('common/header'); diff --git a/upload/admin/language/english/module/amazon_checkout_layout.php b/upload/admin/language/english/module/amazon_button.php similarity index 100% rename from upload/admin/language/english/module/amazon_checkout_layout.php rename to upload/admin/language/english/module/amazon_button.php diff --git a/upload/admin/language/english/module/pp_layout.php b/upload/admin/language/english/module/pp_button.php similarity index 100% rename from upload/admin/language/english/module/pp_layout.php rename to upload/admin/language/english/module/pp_button.php diff --git a/upload/admin/model/design/layout.php b/upload/admin/model/design/layout.php index a0ac06d71f0..10ad5c56edf 100644 --- a/upload/admin/model/design/layout.php +++ b/upload/admin/model/design/layout.php @@ -15,7 +15,7 @@ public function addLayout($data) { if (isset($data['layout_module'])) { foreach ($data['layout_module'] as $layout_module) { - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_module SET layout_id = '" . (int)$layout_id . "', module_id = '" . (int)$layout_module['module_id'] . "', position = '" . $this->db->escape($layout_module['position']) . "', status = '" . (int)$layout_module['status'] . "', sort_order = '" . (int)$layout_module['sort_order'] . "'"); + $this->db->query("INSERT INTO " . DB_PREFIX . "layout_module SET layout_id = '" . (int)$layout_id . "', code = '" . $this->db->escape($layout_module['code']) . "', position = '" . $this->db->escape($layout_module['position']) . "', status = '" . (int)$layout_module['status'] . "', sort_order = '" . (int)$layout_module['sort_order'] . "'"); } } @@ -41,7 +41,7 @@ public function editLayout($layout_id, $data) { if (isset($data['layout_module'])) { foreach ($data['layout_module'] as $layout_module) { - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_module SET layout_id = '" . (int)$layout_id . "', module_id = '" . (int)$layout_module['module_id'] . "', position = '" . $this->db->escape($layout_module['position']) . "', status = '" . (int)$layout_module['status'] . "', sort_order = '" . (int)$layout_module['sort_order'] . "'"); + $this->db->query("INSERT INTO " . DB_PREFIX . "layout_module SET layout_id = '" . (int)$layout_id . "', code = '" . $this->db->escape($layout_module['code']) . "', position = '" . $this->db->escape($layout_module['position']) . "', status = '" . (int)$layout_module['status'] . "', sort_order = '" . (int)$layout_module['sort_order'] . "'"); } } diff --git a/upload/admin/model/extension/module.php b/upload/admin/model/extension/module.php deleted file mode 100644 index 3239136eccd..00000000000 --- a/upload/admin/model/extension/module.php +++ /dev/null @@ -1,22 +0,0 @@ -db->query("DELETE FROM " . DB_PREFIX . "module WHERE code = '" . $this->db->escape($code) . "'"); - - if ($data['module_id']) { - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET module_id = '" . $data['module_id'] . "', `code` = '" . $this->db->escape($code) . "', `setting` = '" . $this->db->escape(serialize($setting)) . "'"); - } else { - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET `code` = '" . $this->db->escape($code) . "', `setting` = '" . $this->db->escape(serialize($setting)) . "'"); - } - } - - public function deleteModules($code) { - $this->db->query("DELETE FROM " . DB_PREFIX . "module WHERE code = '" . $this->db->escape($code) . "'"); - } - - public function getModules($code) { - $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "module WHERE code = '" . $this->db->escape($code) . "'"); - - return $query->rows; - } -} \ No newline at end of file diff --git a/upload/admin/view/template/design/layout_form.tpl b/upload/admin/view/template/design/layout_form.tpl index 3cb232c0539..b5811f28501 100644 --- a/upload/admin/view/template/design/layout_form.tpl +++ b/upload/admin/view/template/design/layout_form.tpl @@ -84,40 +84,17 @@ + '; + html += ' '; html += ' - + - - + - - - -
+ + + +
- + - @@ -83,22 +80,21 @@ \ No newline at end of file diff --git a/upload/admin/view/template/module/bestseller.tpl b/upload/admin/view/template/module/bestseller.tpl index ce4bb506656..55fd175fcba 100644 --- a/upload/admin/view/template/module/bestseller.tpl +++ b/upload/admin/view/template/module/bestseller.tpl @@ -48,18 +48,16 @@ - - - - - - - -
+ + + + + + +
- + - @@ -74,18 +72,17 @@ \ No newline at end of file diff --git a/upload/admin/view/template/module/carousel.tpl b/upload/admin/view/template/module/carousel.tpl index ff679435979..cc9dcbf1ec5 100644 --- a/upload/admin/view/template/module/carousel.tpl +++ b/upload/admin/view/template/module/carousel.tpl @@ -50,28 +50,26 @@ - - - - - + - - - - - -
+ + + + + +
- + - @@ -86,24 +84,23 @@ \ No newline at end of file diff --git a/upload/admin/view/template/module/featured.tpl b/upload/admin/view/template/module/featured.tpl index 1128223e314..733db072097 100644 --- a/upload/admin/view/template/module/featured.tpl +++ b/upload/admin/view/template/module/featured.tpl @@ -62,18 +62,16 @@ - - - - - - - -
+ + + + + + +
- + - @@ -127,18 +125,17 @@ $('#featured-product').delegate('.fa-minus-circle', 'click', function() { }); //--> \ No newline at end of file diff --git a/upload/admin/view/template/module/html.tpl b/upload/admin/view/template/module/html.tpl index 124f62a9622..bf7b09bc7ee 100644 --- a/upload/admin/view/template/module/html.tpl +++ b/upload/admin/view/template/module/html.tpl @@ -3,7 +3,7 @@ \ No newline at end of file diff --git a/upload/catalog/controller/common/column_left.php b/upload/catalog/controller/common/column_left.php index 300b1d832c8..cff890773e2 100644 --- a/upload/catalog/controller/common/column_left.php +++ b/upload/catalog/controller/common/column_left.php @@ -41,8 +41,23 @@ public function index() { $modules = $this->model_design_layout->getLayoutModules($layout_id, 'column_left'); foreach ($modules as $module) { + $part = explode('.', $module['code']); + + if (isset($part[0])) { + $code = $part[0]; + } + + if (isset($part[1])) { + $key = $part[1]; + } + + + if ($this->config->get($module['code'] . '_status')) { if ($this->config->has($module['code'] . '_module')) { + + + $setting = $this->config->get($module['code'] . '_module'); if (isset($setting[$module['key']])) { diff --git a/upload/catalog/controller/module/amazon_checkout_layout.php b/upload/catalog/controller/module/amazon_checkout_layout.php index 594e1ad63cd..6acca052e9f 100644 --- a/upload/catalog/controller/module/amazon_checkout_layout.php +++ b/upload/catalog/controller/module/amazon_checkout_layout.php @@ -33,10 +33,10 @@ public function index($setting) { $data['layout_id'] = $setting['layout_id']; $data['position'] = $setting['position']; - if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/amazon_checkout_layout.tpl')) { - return $this->load->view($this->config->get('config_template') . '/template/module/amazon_checkout_layout.tpl', $data); + if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/amazon_button.tpl')) { + return $this->load->view($this->config->get('config_template') . '/template/module/amazon_button.tpl', $data); } else { - return $this->load->view('default/template/module/amazon_checkout_layout.tpl', $data); + return $this->load->view('default/template/module/amazon_button.tpl', $data); } } } diff --git a/upload/catalog/controller/module/pp_layout.php b/upload/catalog/controller/module/pp_layout.php index 37ffba723ce..8d633648cb2 100644 --- a/upload/catalog/controller/module/pp_layout.php +++ b/upload/catalog/controller/module/pp_layout.php @@ -13,10 +13,10 @@ public function index($setting) { $data['is_mobile'] = $this->model_payment_pp_express->isMobile(); $data['payment_url'] = $this->url->link('payment/pp_express/express', '', 'SSL'); - if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/pp_layout.tpl')) { - return $this->load->view($this->config->get('config_template') . '/template/module/pp_layout.tpl', $data); + if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/pp_button.tpl')) { + return $this->load->view($this->config->get('config_template') . '/template/module/pp_button.tpl', $data); } else { - return $this->load->view('default/template/module/pp_layout.tpl', $data); + return $this->load->view('default/template/module/pp_button.tpl', $data); } } } diff --git a/upload/catalog/model/design/layout.php b/upload/catalog/model/design/layout.php index 4c8faa7e916..4845db3afd1 100644 --- a/upload/catalog/model/design/layout.php +++ b/upload/catalog/model/design/layout.php @@ -11,14 +11,8 @@ public function getLayout($route) { } public function getLayoutModules($layout_id, $position) { - $layout_module_data = array(); + $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "layout_module WHERE layout_id = '" . (int)$layout_id . "' AND position = '" . $this->db->escape($position) . "' ORDER BY sort_order"); - $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "layout_module lm LEFT JOIN " . DB_PREFIX . "module m ON (lm.module_id = m.module_id) WHERE lm.layout_id = '" . (int)$layout_id . "' AND lm.position = '" . $this->db->escape($position) . "' ORDER BY lm.sort_order"); - - foreach ($query->rows as $result) { - $layout_module_data[$result['module_id']] = $result['code']; - } - - return $layout_module_data; + return $query->rows; } } \ No newline at end of file diff --git a/upload/install/opencart.sql b/upload/install/opencart.sql index e277b64ca37..ca7af2530b4 100644 --- a/upload/install/opencart.sql +++ b/upload/install/opencart.sql @@ -1692,11 +1692,12 @@ INSERT INTO `oc_layout` (`layout_id`, `name`) VALUES DROP TABLE IF EXISTS `oc_layout_module`; CREATE TABLE IF NOT EXISTS `oc_layout_module` ( + `layout_module_id` int(11) NOT NULL AUTO_INCREMENT, `layout_id` int(11) NOT NULL, - `module_id` int(11) NOT NULL, - `position` varchar(14) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `code` varchar(64) NOT NULL, + `position` varchar(14) NOT NULL, `sort_order` int(3) NOT NULL, - PRIMARY KEY (`layout_id`) + PRIMARY KEY (`layout_module_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; -- @@ -1903,24 +1904,6 @@ CREATE TABLE `oc_modification` ( -- -------------------------------------------------------- --- --- Table structure for table `oc_module` --- - -DROP TABLE IF EXISTS `oc_module`; -CREATE TABLE IF NOT EXISTS `oc_module` ( - `module_id` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(32) NOT NULL, - `setting` text NOT NULL, - PRIMARY KEY (`module_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; - --- --- Dumping data for table `oc_module` --- - --- -------------------------------------------------------- - -- -- Table structure for table `oc_option` -- @@ -3624,7 +3607,7 @@ CREATE TABLE `oc_user_group` ( -- INSERT INTO `oc_user_group` (`user_group_id`, `name`, `permission`) VALUES -(1, 'Administrator', 'a:2:{s:6:"access";a:177:{i:0;s:17:"catalog/attribute";i:1;s:23:"catalog/attribute_group";i:2;s:16:"catalog/category";i:3;s:16:"catalog/download";i:4;s:14:"catalog/filter";i:5;s:19:"catalog/information";i:6;s:20:"catalog/manufacturer";i:7;s:14:"catalog/option";i:8;s:15:"catalog/product";i:9;s:17:"catalog/recurring";i:10;s:14:"catalog/review";i:11;s:18:"common/column_left";i:12;s:18:"common/filemanager";i:13;s:11:"common/menu";i:14;s:14:"common/profile";i:15;s:12:"common/stats";i:16;s:18:"dashboard/activity";i:17;s:15:"dashboard/chart";i:18;s:18:"dashboard/customer";i:19;s:13:"dashboard/map";i:20;s:16:"dashboard/online";i:21;s:15:"dashboard/order";i:22;s:16:"dashboard/recent";i:23;s:14:"dashboard/sale";i:24;s:13:"design/banner";i:25;s:13:"design/layout";i:26;s:14:"extension/feed";i:27;s:19:"extension/installer";i:28;s:22:"extension/modification";i:29;s:16:"extension/module";i:30;s:17:"extension/openbay";i:31;s:17:"extension/payment";i:32;s:18:"extension/shipping";i:33;s:15:"extension/total";i:34;s:16:"feed/google_base";i:35;s:19:"feed/google_sitemap";i:36;s:20:"localisation/country";i:37;s:21:"localisation/currency";i:38;s:21:"localisation/geo_zone";i:39;s:21:"localisation/language";i:40;s:25:"localisation/length_class";i:41;s:21:"localisation/location";i:42;s:25:"localisation/order_status";i:43;s:26:"localisation/return_action";i:44;s:26:"localisation/return_reason";i:45;s:26:"localisation/return_status";i:46;s:25:"localisation/stock_status";i:47;s:22:"localisation/tax_class";i:48;s:21:"localisation/tax_rate";i:49;s:25:"localisation/weight_class";i:50;s:17:"localisation/zone";i:51;s:19:"marketing/affiliate";i:52;s:17:"marketing/contact";i:53;s:16:"marketing/coupon";i:54;s:19:"marketing/marketing";i:55;s:14:"module/account";i:56;s:16:"module/affiliate";i:57;s:29:"module/amazon_checkout_layout";i:58;s:13:"module/banner";i:59;s:17:"module/bestseller";i:60;s:15:"module/carousel";i:61;s:15:"module/category";i:62;s:18:"module/ebaydisplay";i:63;s:15:"module/featured";i:64;s:13:"module/filter";i:65;s:22:"module/google_hangouts";i:66;s:11:"module/html";i:67;s:18:"module/information";i:68;s:13:"module/latest";i:69;s:14:"module/openbay";i:70;s:16:"module/pp_layout";i:71;s:15:"module/pp_login";i:72;s:16:"module/slideshow";i:73;s:14:"module/special";i:74;s:12:"module/store";i:75;s:14:"openbay/amazon";i:76;s:22:"openbay/amazon_listing";i:77;s:22:"openbay/amazon_product";i:78;s:16:"openbay/amazonus";i:79;s:24:"openbay/amazonus_listing";i:80;s:24:"openbay/amazonus_product";i:81;s:12:"openbay/ebay";i:82;s:20:"openbay/ebay_profile";i:83;s:21:"openbay/ebay_template";i:84;s:12:"openbay/etsy";i:85;s:20:"openbay/etsy_product";i:86;s:21:"openbay/etsy_shipping";i:87;s:17:"openbay/etsy_shop";i:88;s:23:"payment/amazon_checkout";i:89;s:24:"payment/authorizenet_aim";i:90;s:24:"payment/authorizenet_sim";i:91;s:21:"payment/bank_transfer";i:92;s:27:"payment/bluepay_hosted_form";i:93;s:24:"payment/bluepay_redirect";i:94;s:14:"payment/cheque";i:95;s:11:"payment/cod";i:96;s:17:"payment/firstdata";i:97;s:24:"payment/firstdata_remote";i:98;s:21:"payment/free_checkout";i:99;s:22:"payment/klarna_account";i:100;s:22:"payment/klarna_invoice";i:101;s:14:"payment/liqpay";i:102;s:20:"payment/moneybookers";i:103;s:14:"payment/nochex";i:104;s:15:"payment/paymate";i:105;s:16:"payment/paypoint";i:106;s:13:"payment/payza";i:107;s:26:"payment/perpetual_payments";i:108;s:18:"payment/pp_express";i:109;s:18:"payment/pp_payflow";i:110;s:25:"payment/pp_payflow_iframe";i:111;s:14:"payment/pp_pro";i:112;s:21:"payment/pp_pro_iframe";i:113;s:19:"payment/pp_standard";i:114;s:14:"payment/realex";i:115;s:21:"payment/realex_remote";i:116;s:22:"payment/sagepay_direct";i:117;s:22:"payment/sagepay_server";i:118;s:18:"payment/sagepay_us";i:119;s:19:"payment/twocheckout";i:120;s:28:"payment/web_payment_software";i:121;s:16:"payment/worldpay";i:122;s:16:"report/affiliate";i:123;s:25:"report/affiliate_activity";i:124;s:24:"report/customer_activity";i:125;s:22:"report/customer_credit";i:126;s:22:"report/customer_online";i:127;s:21:"report/customer_order";i:128;s:22:"report/customer_reward";i:129;s:16:"report/marketing";i:130;s:24:"report/product_purchased";i:131;s:21:"report/product_viewed";i:132;s:18:"report/sale_coupon";i:133;s:17:"report/sale_order";i:134;s:18:"report/sale_return";i:135;s:20:"report/sale_shipping";i:136;s:15:"report/sale_tax";i:137;s:17:"sale/custom_field";i:138;s:13:"sale/customer";i:139;s:20:"sale/customer_ban_ip";i:140;s:19:"sale/customer_group";i:141;s:10:"sale/order";i:142;s:14:"sale/recurring";i:143;s:11:"sale/return";i:144;s:12:"sale/voucher";i:145;s:18:"sale/voucher_theme";i:146;s:15:"setting/setting";i:147;s:13:"setting/store";i:148;s:16:"shipping/auspost";i:149;s:17:"shipping/citylink";i:150;s:14:"shipping/fedex";i:151;s:13:"shipping/flat";i:152;s:13:"shipping/free";i:153;s:13:"shipping/item";i:154;s:23:"shipping/parcelforce_48";i:155;s:15:"shipping/pickup";i:156;s:19:"shipping/royal_mail";i:157;s:12:"shipping/ups";i:158;s:13:"shipping/usps";i:159;s:15:"shipping/weight";i:160;s:11:"tool/backup";i:161;s:14:"tool/error_log";i:162;s:11:"tool/upload";i:163;s:12:"total/coupon";i:164;s:12:"total/credit";i:165;s:14:"total/handling";i:166;s:16:"total/klarna_fee";i:167;s:19:"total/low_order_fee";i:168;s:12:"total/reward";i:169;s:14:"total/shipping";i:170;s:15:"total/sub_total";i:171;s:9:"total/tax";i:172;s:11:"total/total";i:173;s:13:"total/voucher";i:174;s:8:"user/api";i:175;s:9:"user/user";i:176;s:20:"user/user_permission";}s:6:"modify";a:177:{i:0;s:17:"catalog/attribute";i:1;s:23:"catalog/attribute_group";i:2;s:16:"catalog/category";i:3;s:16:"catalog/download";i:4;s:14:"catalog/filter";i:5;s:19:"catalog/information";i:6;s:20:"catalog/manufacturer";i:7;s:14:"catalog/option";i:8;s:15:"catalog/product";i:9;s:17:"catalog/recurring";i:10;s:14:"catalog/review";i:11;s:18:"common/column_left";i:12;s:18:"common/filemanager";i:13;s:11:"common/menu";i:14;s:14:"common/profile";i:15;s:12:"common/stats";i:16;s:18:"dashboard/activity";i:17;s:15:"dashboard/chart";i:18;s:18:"dashboard/customer";i:19;s:13:"dashboard/map";i:20;s:16:"dashboard/online";i:21;s:15:"dashboard/order";i:22;s:16:"dashboard/recent";i:23;s:14:"dashboard/sale";i:24;s:13:"design/banner";i:25;s:13:"design/layout";i:26;s:14:"extension/feed";i:27;s:19:"extension/installer";i:28;s:22:"extension/modification";i:29;s:16:"extension/module";i:30;s:17:"extension/openbay";i:31;s:17:"extension/payment";i:32;s:18:"extension/shipping";i:33;s:15:"extension/total";i:34;s:16:"feed/google_base";i:35;s:19:"feed/google_sitemap";i:36;s:20:"localisation/country";i:37;s:21:"localisation/currency";i:38;s:21:"localisation/geo_zone";i:39;s:21:"localisation/language";i:40;s:25:"localisation/length_class";i:41;s:21:"localisation/location";i:42;s:25:"localisation/order_status";i:43;s:26:"localisation/return_action";i:44;s:26:"localisation/return_reason";i:45;s:26:"localisation/return_status";i:46;s:25:"localisation/stock_status";i:47;s:22:"localisation/tax_class";i:48;s:21:"localisation/tax_rate";i:49;s:25:"localisation/weight_class";i:50;s:17:"localisation/zone";i:51;s:19:"marketing/affiliate";i:52;s:17:"marketing/contact";i:53;s:16:"marketing/coupon";i:54;s:19:"marketing/marketing";i:55;s:14:"module/account";i:56;s:16:"module/affiliate";i:57;s:29:"module/amazon_checkout_layout";i:58;s:13:"module/banner";i:59;s:17:"module/bestseller";i:60;s:15:"module/carousel";i:61;s:15:"module/category";i:62;s:18:"module/ebaydisplay";i:63;s:15:"module/featured";i:64;s:13:"module/filter";i:65;s:22:"module/google_hangouts";i:66;s:11:"module/html";i:67;s:18:"module/information";i:68;s:13:"module/latest";i:69;s:14:"module/openbay";i:70;s:16:"module/pp_layout";i:71;s:15:"module/pp_login";i:72;s:16:"module/slideshow";i:73;s:14:"module/special";i:74;s:12:"module/store";i:75;s:14:"openbay/amazon";i:76;s:22:"openbay/amazon_listing";i:77;s:22:"openbay/amazon_product";i:78;s:16:"openbay/amazonus";i:79;s:24:"openbay/amazonus_listing";i:80;s:24:"openbay/amazonus_product";i:81;s:12:"openbay/ebay";i:82;s:20:"openbay/ebay_profile";i:83;s:21:"openbay/ebay_template";i:84;s:12:"openbay/etsy";i:85;s:20:"openbay/etsy_product";i:86;s:21:"openbay/etsy_shipping";i:87;s:17:"openbay/etsy_shop";i:88;s:23:"payment/amazon_checkout";i:89;s:24:"payment/authorizenet_aim";i:90;s:24:"payment/authorizenet_sim";i:91;s:21:"payment/bank_transfer";i:92;s:27:"payment/bluepay_hosted_form";i:93;s:24:"payment/bluepay_redirect";i:94;s:14:"payment/cheque";i:95;s:11:"payment/cod";i:96;s:17:"payment/firstdata";i:97;s:24:"payment/firstdata_remote";i:98;s:21:"payment/free_checkout";i:99;s:22:"payment/klarna_account";i:100;s:22:"payment/klarna_invoice";i:101;s:14:"payment/liqpay";i:102;s:20:"payment/moneybookers";i:103;s:14:"payment/nochex";i:104;s:15:"payment/paymate";i:105;s:16:"payment/paypoint";i:106;s:13:"payment/payza";i:107;s:26:"payment/perpetual_payments";i:108;s:18:"payment/pp_express";i:109;s:18:"payment/pp_payflow";i:110;s:25:"payment/pp_payflow_iframe";i:111;s:14:"payment/pp_pro";i:112;s:21:"payment/pp_pro_iframe";i:113;s:19:"payment/pp_standard";i:114;s:14:"payment/realex";i:115;s:21:"payment/realex_remote";i:116;s:22:"payment/sagepay_direct";i:117;s:22:"payment/sagepay_server";i:118;s:18:"payment/sagepay_us";i:119;s:19:"payment/twocheckout";i:120;s:28:"payment/web_payment_software";i:121;s:16:"payment/worldpay";i:122;s:16:"report/affiliate";i:123;s:25:"report/affiliate_activity";i:124;s:24:"report/customer_activity";i:125;s:22:"report/customer_credit";i:126;s:22:"report/customer_online";i:127;s:21:"report/customer_order";i:128;s:22:"report/customer_reward";i:129;s:16:"report/marketing";i:130;s:24:"report/product_purchased";i:131;s:21:"report/product_viewed";i:132;s:18:"report/sale_coupon";i:133;s:17:"report/sale_order";i:134;s:18:"report/sale_return";i:135;s:20:"report/sale_shipping";i:136;s:15:"report/sale_tax";i:137;s:17:"sale/custom_field";i:138;s:13:"sale/customer";i:139;s:20:"sale/customer_ban_ip";i:140;s:19:"sale/customer_group";i:141;s:10:"sale/order";i:142;s:14:"sale/recurring";i:143;s:11:"sale/return";i:144;s:12:"sale/voucher";i:145;s:18:"sale/voucher_theme";i:146;s:15:"setting/setting";i:147;s:13:"setting/store";i:148;s:16:"shipping/auspost";i:149;s:17:"shipping/citylink";i:150;s:14:"shipping/fedex";i:151;s:13:"shipping/flat";i:152;s:13:"shipping/free";i:153;s:13:"shipping/item";i:154;s:23:"shipping/parcelforce_48";i:155;s:15:"shipping/pickup";i:156;s:19:"shipping/royal_mail";i:157;s:12:"shipping/ups";i:158;s:13:"shipping/usps";i:159;s:15:"shipping/weight";i:160;s:11:"tool/backup";i:161;s:14:"tool/error_log";i:162;s:11:"tool/upload";i:163;s:12:"total/coupon";i:164;s:12:"total/credit";i:165;s:14:"total/handling";i:166;s:16:"total/klarna_fee";i:167;s:19:"total/low_order_fee";i:168;s:12:"total/reward";i:169;s:14:"total/shipping";i:170;s:15:"total/sub_total";i:171;s:9:"total/tax";i:172;s:11:"total/total";i:173;s:13:"total/voucher";i:174;s:8:"user/api";i:175;s:9:"user/user";i:176;s:20:"user/user_permission";}}'), +(1, 'Administrator', 'a:2:{s:6:"access";a:177:{i:0;s:17:"catalog/attribute";i:1;s:23:"catalog/attribute_group";i:2;s:16:"catalog/category";i:3;s:16:"catalog/download";i:4;s:14:"catalog/filter";i:5;s:19:"catalog/information";i:6;s:20:"catalog/manufacturer";i:7;s:14:"catalog/option";i:8;s:15:"catalog/product";i:9;s:17:"catalog/recurring";i:10;s:14:"catalog/review";i:11;s:18:"common/column_left";i:12;s:18:"common/filemanager";i:13;s:11:"common/menu";i:14;s:14:"common/profile";i:15;s:12:"common/stats";i:16;s:18:"dashboard/activity";i:17;s:15:"dashboard/chart";i:18;s:18:"dashboard/customer";i:19;s:13:"dashboard/map";i:20;s:16:"dashboard/online";i:21;s:15:"dashboard/order";i:22;s:16:"dashboard/recent";i:23;s:14:"dashboard/sale";i:24;s:13:"design/banner";i:25;s:13:"design/layout";i:26;s:14:"extension/feed";i:27;s:19:"extension/installer";i:28;s:22:"extension/modification";i:29;s:16:"extension/module";i:30;s:17:"extension/openbay";i:31;s:17:"extension/payment";i:32;s:18:"extension/shipping";i:33;s:15:"extension/total";i:34;s:16:"feed/google_base";i:35;s:19:"feed/google_sitemap";i:36;s:20:"localisation/country";i:37;s:21:"localisation/currency";i:38;s:21:"localisation/geo_zone";i:39;s:21:"localisation/language";i:40;s:25:"localisation/length_class";i:41;s:21:"localisation/location";i:42;s:25:"localisation/order_status";i:43;s:26:"localisation/return_action";i:44;s:26:"localisation/return_reason";i:45;s:26:"localisation/return_status";i:46;s:25:"localisation/stock_status";i:47;s:22:"localisation/tax_class";i:48;s:21:"localisation/tax_rate";i:49;s:25:"localisation/weight_class";i:50;s:17:"localisation/zone";i:51;s:19:"marketing/affiliate";i:52;s:17:"marketing/contact";i:53;s:16:"marketing/coupon";i:54;s:19:"marketing/marketing";i:55;s:14:"module/account";i:56;s:16:"module/affiliate";i:57;s:29:"module/amazon_button";i:58;s:13:"module/banner";i:59;s:17:"module/bestseller";i:60;s:15:"module/carousel";i:61;s:15:"module/category";i:62;s:18:"module/ebaydisplay";i:63;s:15:"module/featured";i:64;s:13:"module/filter";i:65;s:22:"module/google_hangouts";i:66;s:11:"module/html";i:67;s:18:"module/information";i:68;s:13:"module/latest";i:69;s:14:"module/openbay";i:70;s:16:"module/pp_button";i:71;s:15:"module/pp_login";i:72;s:16:"module/slideshow";i:73;s:14:"module/special";i:74;s:12:"module/store";i:75;s:14:"openbay/amazon";i:76;s:22:"openbay/amazon_listing";i:77;s:22:"openbay/amazon_product";i:78;s:16:"openbay/amazonus";i:79;s:24:"openbay/amazonus_listing";i:80;s:24:"openbay/amazonus_product";i:81;s:12:"openbay/ebay";i:82;s:20:"openbay/ebay_profile";i:83;s:21:"openbay/ebay_template";i:84;s:12:"openbay/etsy";i:85;s:20:"openbay/etsy_product";i:86;s:21:"openbay/etsy_shipping";i:87;s:17:"openbay/etsy_shop";i:88;s:23:"payment/amazon_checkout";i:89;s:24:"payment/authorizenet_aim";i:90;s:24:"payment/authorizenet_sim";i:91;s:21:"payment/bank_transfer";i:92;s:27:"payment/bluepay_hosted_form";i:93;s:24:"payment/bluepay_redirect";i:94;s:14:"payment/cheque";i:95;s:11:"payment/cod";i:96;s:17:"payment/firstdata";i:97;s:24:"payment/firstdata_remote";i:98;s:21:"payment/free_checkout";i:99;s:22:"payment/klarna_account";i:100;s:22:"payment/klarna_invoice";i:101;s:14:"payment/liqpay";i:102;s:20:"payment/moneybookers";i:103;s:14:"payment/nochex";i:104;s:15:"payment/paymate";i:105;s:16:"payment/paypoint";i:106;s:13:"payment/payza";i:107;s:26:"payment/perpetual_payments";i:108;s:18:"payment/pp_express";i:109;s:18:"payment/pp_payflow";i:110;s:25:"payment/pp_payflow_iframe";i:111;s:14:"payment/pp_pro";i:112;s:21:"payment/pp_pro_iframe";i:113;s:19:"payment/pp_standard";i:114;s:14:"payment/realex";i:115;s:21:"payment/realex_remote";i:116;s:22:"payment/sagepay_direct";i:117;s:22:"payment/sagepay_server";i:118;s:18:"payment/sagepay_us";i:119;s:19:"payment/twocheckout";i:120;s:28:"payment/web_payment_software";i:121;s:16:"payment/worldpay";i:122;s:16:"report/affiliate";i:123;s:25:"report/affiliate_activity";i:124;s:24:"report/customer_activity";i:125;s:22:"report/customer_credit";i:126;s:22:"report/customer_online";i:127;s:21:"report/customer_order";i:128;s:22:"report/customer_reward";i:129;s:16:"report/marketing";i:130;s:24:"report/product_purchased";i:131;s:21:"report/product_viewed";i:132;s:18:"report/sale_coupon";i:133;s:17:"report/sale_order";i:134;s:18:"report/sale_return";i:135;s:20:"report/sale_shipping";i:136;s:15:"report/sale_tax";i:137;s:17:"sale/custom_field";i:138;s:13:"sale/customer";i:139;s:20:"sale/customer_ban_ip";i:140;s:19:"sale/customer_group";i:141;s:10:"sale/order";i:142;s:14:"sale/recurring";i:143;s:11:"sale/return";i:144;s:12:"sale/voucher";i:145;s:18:"sale/voucher_theme";i:146;s:15:"setting/setting";i:147;s:13:"setting/store";i:148;s:16:"shipping/auspost";i:149;s:17:"shipping/citylink";i:150;s:14:"shipping/fedex";i:151;s:13:"shipping/flat";i:152;s:13:"shipping/free";i:153;s:13:"shipping/item";i:154;s:23:"shipping/parcelforce_48";i:155;s:15:"shipping/pickup";i:156;s:19:"shipping/royal_mail";i:157;s:12:"shipping/ups";i:158;s:13:"shipping/usps";i:159;s:15:"shipping/weight";i:160;s:11:"tool/backup";i:161;s:14:"tool/error_log";i:162;s:11:"tool/upload";i:163;s:12:"total/coupon";i:164;s:12:"total/credit";i:165;s:14:"total/handling";i:166;s:16:"total/klarna_fee";i:167;s:19:"total/low_order_fee";i:168;s:12:"total/reward";i:169;s:14:"total/shipping";i:170;s:15:"total/sub_total";i:171;s:9:"total/tax";i:172;s:11:"total/total";i:173;s:13:"total/voucher";i:174;s:8:"user/api";i:175;s:9:"user/user";i:176;s:20:"user/user_permission";}s:6:"modify";a:177:{i:0;s:17:"catalog/attribute";i:1;s:23:"catalog/attribute_group";i:2;s:16:"catalog/category";i:3;s:16:"catalog/download";i:4;s:14:"catalog/filter";i:5;s:19:"catalog/information";i:6;s:20:"catalog/manufacturer";i:7;s:14:"catalog/option";i:8;s:15:"catalog/product";i:9;s:17:"catalog/recurring";i:10;s:14:"catalog/review";i:11;s:18:"common/column_left";i:12;s:18:"common/filemanager";i:13;s:11:"common/menu";i:14;s:14:"common/profile";i:15;s:12:"common/stats";i:16;s:18:"dashboard/activity";i:17;s:15:"dashboard/chart";i:18;s:18:"dashboard/customer";i:19;s:13:"dashboard/map";i:20;s:16:"dashboard/online";i:21;s:15:"dashboard/order";i:22;s:16:"dashboard/recent";i:23;s:14:"dashboard/sale";i:24;s:13:"design/banner";i:25;s:13:"design/layout";i:26;s:14:"extension/feed";i:27;s:19:"extension/installer";i:28;s:22:"extension/modification";i:29;s:16:"extension/module";i:30;s:17:"extension/openbay";i:31;s:17:"extension/payment";i:32;s:18:"extension/shipping";i:33;s:15:"extension/total";i:34;s:16:"feed/google_base";i:35;s:19:"feed/google_sitemap";i:36;s:20:"localisation/country";i:37;s:21:"localisation/currency";i:38;s:21:"localisation/geo_zone";i:39;s:21:"localisation/language";i:40;s:25:"localisation/length_class";i:41;s:21:"localisation/location";i:42;s:25:"localisation/order_status";i:43;s:26:"localisation/return_action";i:44;s:26:"localisation/return_reason";i:45;s:26:"localisation/return_status";i:46;s:25:"localisation/stock_status";i:47;s:22:"localisation/tax_class";i:48;s:21:"localisation/tax_rate";i:49;s:25:"localisation/weight_class";i:50;s:17:"localisation/zone";i:51;s:19:"marketing/affiliate";i:52;s:17:"marketing/contact";i:53;s:16:"marketing/coupon";i:54;s:19:"marketing/marketing";i:55;s:14:"module/account";i:56;s:16:"module/affiliate";i:57;s:29:"module/amazon_button";i:58;s:13:"module/banner";i:59;s:17:"module/bestseller";i:60;s:15:"module/carousel";i:61;s:15:"module/category";i:62;s:18:"module/ebaydisplay";i:63;s:15:"module/featured";i:64;s:13:"module/filter";i:65;s:22:"module/google_hangouts";i:66;s:11:"module/html";i:67;s:18:"module/information";i:68;s:13:"module/latest";i:69;s:14:"module/openbay";i:70;s:16:"module/pp_button";i:71;s:15:"module/pp_login";i:72;s:16:"module/slideshow";i:73;s:14:"module/special";i:74;s:12:"module/store";i:75;s:14:"openbay/amazon";i:76;s:22:"openbay/amazon_listing";i:77;s:22:"openbay/amazon_product";i:78;s:16:"openbay/amazonus";i:79;s:24:"openbay/amazonus_listing";i:80;s:24:"openbay/amazonus_product";i:81;s:12:"openbay/ebay";i:82;s:20:"openbay/ebay_profile";i:83;s:21:"openbay/ebay_template";i:84;s:12:"openbay/etsy";i:85;s:20:"openbay/etsy_product";i:86;s:21:"openbay/etsy_shipping";i:87;s:17:"openbay/etsy_shop";i:88;s:23:"payment/amazon_checkout";i:89;s:24:"payment/authorizenet_aim";i:90;s:24:"payment/authorizenet_sim";i:91;s:21:"payment/bank_transfer";i:92;s:27:"payment/bluepay_hosted_form";i:93;s:24:"payment/bluepay_redirect";i:94;s:14:"payment/cheque";i:95;s:11:"payment/cod";i:96;s:17:"payment/firstdata";i:97;s:24:"payment/firstdata_remote";i:98;s:21:"payment/free_checkout";i:99;s:22:"payment/klarna_account";i:100;s:22:"payment/klarna_invoice";i:101;s:14:"payment/liqpay";i:102;s:20:"payment/moneybookers";i:103;s:14:"payment/nochex";i:104;s:15:"payment/paymate";i:105;s:16:"payment/paypoint";i:106;s:13:"payment/payza";i:107;s:26:"payment/perpetual_payments";i:108;s:18:"payment/pp_express";i:109;s:18:"payment/pp_payflow";i:110;s:25:"payment/pp_payflow_iframe";i:111;s:14:"payment/pp_pro";i:112;s:21:"payment/pp_pro_iframe";i:113;s:19:"payment/pp_standard";i:114;s:14:"payment/realex";i:115;s:21:"payment/realex_remote";i:116;s:22:"payment/sagepay_direct";i:117;s:22:"payment/sagepay_server";i:118;s:18:"payment/sagepay_us";i:119;s:19:"payment/twocheckout";i:120;s:28:"payment/web_payment_software";i:121;s:16:"payment/worldpay";i:122;s:16:"report/affiliate";i:123;s:25:"report/affiliate_activity";i:124;s:24:"report/customer_activity";i:125;s:22:"report/customer_credit";i:126;s:22:"report/customer_online";i:127;s:21:"report/customer_order";i:128;s:22:"report/customer_reward";i:129;s:16:"report/marketing";i:130;s:24:"report/product_purchased";i:131;s:21:"report/product_viewed";i:132;s:18:"report/sale_coupon";i:133;s:17:"report/sale_order";i:134;s:18:"report/sale_return";i:135;s:20:"report/sale_shipping";i:136;s:15:"report/sale_tax";i:137;s:17:"sale/custom_field";i:138;s:13:"sale/customer";i:139;s:20:"sale/customer_ban_ip";i:140;s:19:"sale/customer_group";i:141;s:10:"sale/order";i:142;s:14:"sale/recurring";i:143;s:11:"sale/return";i:144;s:12:"sale/voucher";i:145;s:18:"sale/voucher_theme";i:146;s:15:"setting/setting";i:147;s:13:"setting/store";i:148;s:16:"shipping/auspost";i:149;s:17:"shipping/citylink";i:150;s:14:"shipping/fedex";i:151;s:13:"shipping/flat";i:152;s:13:"shipping/free";i:153;s:13:"shipping/item";i:154;s:23:"shipping/parcelforce_48";i:155;s:15:"shipping/pickup";i:156;s:19:"shipping/royal_mail";i:157;s:12:"shipping/ups";i:158;s:13:"shipping/usps";i:159;s:15:"shipping/weight";i:160;s:11:"tool/backup";i:161;s:14:"tool/error_log";i:162;s:11:"tool/upload";i:163;s:12:"total/coupon";i:164;s:12:"total/credit";i:165;s:14:"total/handling";i:166;s:16:"total/klarna_fee";i:167;s:19:"total/low_order_fee";i:168;s:12:"total/reward";i:169;s:14:"total/shipping";i:170;s:15:"total/sub_total";i:171;s:9:"total/tax";i:172;s:11:"total/total";i:173;s:13:"total/voucher";i:174;s:8:"user/api";i:175;s:9:"user/user";i:176;s:20:"user/user_permission";}}'), (10, 'Demonstration', ''); -- --------------------------------------------------------