Jump to content

top horizontal menu is not showing in index


Recommended Posts

hello everybody ,

I am very new to prestashop .I just uninstall the top horizontal menu and then install again . But now the menu bar is not showing in index page . menubar is showing all other pages but not in front page .

I dont understand whats the problem .

Can anyone tell me how to fix that .

thanks in advanced .

Link to comment
Share on other sites

I have followed these procedure but still it is not working ..... in the blocktopmenu.php file i just change in this function to comment a loop so that i can avoid the drop down categories .

 

 

private function getCategory($id_category, $id_lang = false, $id_shop = false)
{
 $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id;
 $category = new Category((int)$id_category, (int)$id_lang);
 if ($category->level_depth > 1)
  $category_link = $category->getLink();
 else
  $category_link = $this->context->link->getPageLink('index');
 if (is_null($category->id))
  return;
 $children = Category::getChildren((int)$id_category, (int)$id_lang, true, (int)$id_shop);
 $selected = ($this->page_name == 'category' && ((int)Tools::getValue('id_category') == $id_category)) ? ' class="sfHoverForce"' : '';
 $is_intersected = array_intersect($category->getGroups(), $this->user_groups);
 // filter the categories that the user is allowed to see and browse
 if (!empty($is_intersected))
 {
  $this->_menu .= '<li '.$selected.'>';
  $this->_menu .= '<a href="'.$category_link.'">'.$category->name.'</a>';
  /*if (count($children))
  {
   $this->_menu .= '<ul>';
   foreach ($children as $child)
 $this->getCategory((int)$child['id_category'], (int)$id_lang, (int)$child['id_shop']);
   $this->_menu .= '</ul>';
  }*/
  $this->_menu .= '</li>';
 }
}

Edited by raficsedu (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...