[-] 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

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);

View File

@@ -4,8 +4,8 @@
<displayName><![CDATA[Top horizontal menu]]></displayName>
<version><![CDATA[1.3]]></version>
<description><![CDATA[Add a new menu on top of your shop.]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[Julien Breux Developpement]]></tab>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>