//small fix - added new link on block top menu

This commit is contained in:
Vincent Augagneur
2013-10-21 22:29:56 +02:00
parent fb167d94f9
commit 6bc9b54306
+8 -2
View File
@@ -151,6 +151,12 @@ class Blocktopmenu extends Module
}
else if (Tools::isSubmit('submitBlocktopmenuLinks'))
{
foreach ($languages as $key => $val)
{
$links_label[$val['id_lang']] = Tools::getValue('link_'.(int)$val['id_lang']);
$labels[$val['id_lang']] = Tools::getValue('label_'.(int)$val['id_lang']);
}
if ((!count($links_label)) && (!count($labels)))
;
else if (!count($links_label))
@@ -161,7 +167,7 @@ class Blocktopmenu extends Module
$this->_html .= $this->displayError($this->l('Please add a label for your default language.'));
else
{
MenuTopLinks::add(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0), (int)Shop::getContextShopID());
MenuTopLinks::add($links_label, $labels, Tools::getValue('new_window', 0), (int)Shop::getContextShopID());
$this->_html .= $this->displayConfirmation($this->l('The link has been added.'));
}
$update_cache = true;
@@ -1027,4 +1033,4 @@ class Blocktopmenu extends Module
return $helper->generateList($links, $fields_list);
}
}
}