From 2171d7ee72ca806bd8aa4adc19a2a47b07730bb4 Mon Sep 17 00:00:00 2001 From: fGaillard Date: Wed, 28 Dec 2011 14:39:55 +0000 Subject: [PATCH] [-] BO : #PSTEST-214 : BugFix : Get content using context shop git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11848 b9a71923-0436-4b27-9f14-aed3839534dd --- modules/blocktopmenu/blocktopmenu.php | 10 ++++++---- modules/blocktopmenu/config.xml | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/blocktopmenu/blocktopmenu.php b/modules/blocktopmenu/blocktopmenu.php index 447059a5f..fede115a8 100644 --- a/modules/blocktopmenu/blocktopmenu.php +++ b/modules/blocktopmenu/blocktopmenu.php @@ -98,7 +98,7 @@ class blocktopmenu extends Module global $cookie; if(Tools::isSubmit('submitBlocktopmenu')) { - if(Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', Tools::getValue('items'))) + if (Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', Tools::getValue('items'), false, (int)$this->context->shop->id_group_shop, (int)$this->context->shop->id)) $this->_html .= $this->displayConfirmation($this->l('Settings Updated')); else $this->_html .= $this->displayError($this->l('Unable to update settings')); @@ -324,14 +324,16 @@ class blocktopmenu extends Module { if (Context::shop() == Shop::CONTEXT_SHOP) { - if (!Configuration::isOverridenByCurrentContext('MOD_BLOCKTOPMENU_ITEMS')) - $items_shop = Configuration::get('MOD_BLOCKTOPMENU_ITEMS'); + if (!Configuration::isOverridenByCurrentContext('MOD_BLOCKTOPMENU_ITEMS')) + { + $items_shop = Configuration::get('MOD_BLOCKTOPMENU_ITEMS', NULL, (int)$this->context->shop->id_group_shop, (int)$this->context->shop->id); + } } if (!isset($items_shop)) $items_shop = ''; $items_shop = explode(',', $items_shop); - $items_global = Configuration::getGlobalValue('MOD_BLOCKTOPMENU_ITEMS'); + $items_global = Configuration::get('MOD_BLOCKTOPMENU_ITEMS', NULL, (int)$this->context->shop->id_group_shop, (int)$this->context->shop->id); $items_global = explode(',', $items_global); $items_global = array_diff($items_global, $items_shop); diff --git a/modules/blocktopmenu/config.xml b/modules/blocktopmenu/config.xml index 72d1934f5..a08fb7689 100644 --- a/modules/blocktopmenu/config.xml +++ b/modules/blocktopmenu/config.xml @@ -4,8 +4,8 @@ - - + + 1 1