[-] 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
This commit is contained in:
fGaillard
2011-12-28 14:39:55 +00:00
parent 2e8597a9ed
commit 2171d7ee72
2 changed files with 8 additions and 6 deletions
+6 -4
View File
@@ -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);