php - Magento - Categories do not show properly in catalog -


i'm using magento 1.81 codewix category accordion menu extension.

the code: class codewix_leftmenu_block_navigation extends mage_catalog_block_navigation {

 protected $_leftcategories;  /**  * top level parent category current category  *  * @var int  */ protected $_parent;  protected function _construct() {     $path = $this->getcurrentcategorypath();     $parent = $path[count($path)-1];     if (!$parent) {         $parent = mage::app()->getstore()->getrootcategoryid();     }     $this->_parent = $parent; }  public function getblocktitle() {  }  public $curr_class ="main-categ";  public function  get_categories($categories) {         $i=0;          $helper = mage::helper('catalog/category');          if($i==0) {         $ul_id="outer_ul";          } else {         $ul_id="inner_ul";         }     $array= '<ul id="'.$ul_id.'" class="'.$this->curr_class.'">';      $this->i++;     foreach($categories $category) {         $cat = mage::getmodel('catalog/category')->load($category->getid());      if($category->getid() != 1) {             if($this->iscategoryactive($category)) {                 $this->curr_class = "current";                  } else {                 $this->curr_class = "main-categ";                 }             if($category->haschildren()) {              } else {               }         $array .= '<li id="big-categ" style="background-color: red;">'.'<label class="'.$class.'">'.'<a href="'.$helper->getcategoryurl($category).'">'.$category->getname()."</a> (".$cat->getproductcount().")</label>" . '</li>';     }         if($category->haschildren()) {              $children = mage::getmodel('catalog/category')->getcategories($category->getid());              $array .= '<li id="small-categ" style="  visibility: visible;">' . $this->get_categories($children) . '</li>';             }          $array .= '</li>';  }     return  $array . '</ul>';   } 

}

outputs following

enter image description here

and want output

enter image description here

without css business (visibility / display)

thanks!

i think should edit .phtml file displays accordian , has like

echo($this->get_categories($somearrayofalltoplevelcategories)); 

change

$myparticularchildcategories = mage::getmodel('catalog/category')->getcategories([put here integer id of rochii category]); echo($this->getcategories($myparticularchildcategories)); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -