//small fix - added new link on block top menu
This commit is contained in:
@@ -151,6 +151,12 @@ class Blocktopmenu extends Module
|
|||||||
}
|
}
|
||||||
else if (Tools::isSubmit('submitBlocktopmenuLinks'))
|
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)))
|
if ((!count($links_label)) && (!count($labels)))
|
||||||
;
|
;
|
||||||
else if (!count($links_label))
|
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.'));
|
$this->_html .= $this->displayError($this->l('Please add a label for your default language.'));
|
||||||
else
|
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.'));
|
$this->_html .= $this->displayConfirmation($this->l('The link has been added.'));
|
||||||
}
|
}
|
||||||
$update_cache = true;
|
$update_cache = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user