http://sklep.weider-polska.pl/
Fatal error: Call to a member function count() on a non-object in /home/platne/weider/public_html/sklep/app/design/frontend/default/blank/template/catalog/navigation/left_menu.phtml on line 3
Plik left_menu.phtml wygląda tak:
Kod: Zaznacz cały
<?php
$_main_categories=$this->getStoreCategories(10);
if($_main_categories->count())
{
?><ul><?
foreach ($_main_categories as $_main_category)
{
?><li class="<?=$_main_category->getName()?><? if ($this->isCategoryActive($_main_category)) : ?> active<? endif; ?>"><a href="<?=$this->getCategoryUrl($_main_category)?>"<? if ($this->isCategoryActive($_main_category)) : ?> class="active"<? endif; ?>><?=$_main_category->getName()?></a></li><?
if ($this->isCategoryActive($_main_category))
{
$children = $_main_category->getChildren();
$hasChildren = $children && $children->count();
if ($hasChildren)
{
?><ul><?
foreach ($children as $child)
{
?><li><a href="<?=$this->getCategoryUrl($child)?>"<? if ($this->isCategoryActive($child)) : ?> class="active"<? endif; ?>><?=$child->getName()?></a></li><?
if ($this->isCategoryActive($child))
{
$childrenL3 = $child->getChildren();
$hasChildrenL3 = $childrenL3 && $childrenL3->count();
if ($hasChildrenL3)
{
?><ul id="menu_level3"><?
foreach ($childrenL3 as $childL3)
{
?><li><a href="<?=$this->getCategoryUrl($childL3)?>"<? if ($this->isCategoryActive($childL3)) : ?> class="active"<? endif; ?>><?=$childL3->getName()?></a></li><?
}
?></ul><?
}
}
}
?></ul><?
}
}
}
?></ul><?
}?>