[-] MO : #PSFV-717 - Fix some little bugs with blocktopmenu + Normalize the code

This commit is contained in:
mDeflotte committed 2012-03-26 09:29:26 +00:00
1 parent 2dfff9028e
commit 22bf9c91c7
1 file changed
+4 -6
+4 -6
View File
@@ -517,7 +517,7 @@ class Blocktopmenu extends Module
private function getCategoryOption($id_category = 1, $id_lang = false, $recursive = true) private function getCategoryOption($id_category = 1, $id_lang = false, $recursive = true)
{ {
$id_lang = (int)($id_lang ? $id_lang : Shop::getContextShopID()); $id_lang = (int)($id_lang ? $id_lang : Context::getContext()->language->id);
$category = new Category($id_category, $id_lang); $category = new Category($id_category, $id_lang);
if (is_null($category->id)) if (is_null($category->id))
@@ -619,13 +619,11 @@ class Blocktopmenu extends Module
public function hookTop($param) public function hookTop($param)
{ {
global $smarty;
$this->makeMenu(); $this->makeMenu();
$smarty->assign('MENU_SEARCH', Configuration::get('MOD_BLOCKTOPMENU_SEARCH')); $this->smarty->assign('MENU_SEARCH', Configuration::get('MOD_BLOCKTOPMENU_SEARCH'));
$smarty->assign('MENU', $this->_menu); $this->smarty->assign('MENU', $this->_menu);
$smarty->assign('this_path', $this->_path); $this->smarty->assign('this_path', $this->_path);
$this->context->controller->addJS($this->_path.'js/hoverIntent.js'); $this->context->controller->addJS($this->_path.'js/hoverIntent.js');
$this->context->controller->addJS($this->_path.'js/superfish-modified.js'); $this->context->controller->addJS($this->_path.'js/superfish-modified.js');