I am stuck with this, I want show Layered navigation for all sub category.
My "Is Anchor" For all sub category is enabled to Yes. Please suggest me way how I can show this.
Code for _getItemsData-->
protected function _getItemsData() {
if ($_module = Mage::app()->getRequest()->getModuleName() == "catalogsearch")
return $this->_getItemsDataSearch();
$key = $this->getLayer()->getStateKey() . '_SUBCATEGORIES';
$data = $this->getLayer()->getAggregator()->getCacheData($key);
if ($data === null) {
$category = $this->getCategory();
/** @var $categoty Mage_Catalog_Model_Categeory */
$categories = $this->_getChildrenCategories($category);
//$this->getLayer()->getProductCollection()
// ->addCountToCategories($categories);
$data = array();
foreach ($categories as $category) {
if ($category->getIsActive()) {
$_count = Mage::getModel('catalog/layer')->setCurrentCategory($category)->getProductCollection()->getSize();
//$_count = $category->getProductCount() ;
//Mage::getModel('catalog/layer')->setCurrentCategory($category)->getProductCollection()->getSize();
if (!Mage::getStoreConfig("ajaxlist/ajaxlist/show_no_count") && !$_count) {
continue;
}
$data[] = array(
'label' => Mage::helper('core')->htmlEscape($category->getName()),
'value' => $category->getId(),
'count' => $_count,
);
}
}
$tags = $this->getLayer()->getStateTags();
$this->getLayer()->getAggregator()->saveCacheData($data, $key, $tags);
}
return $data;
}
Image 1- I want to show category as appear on Image 1 to Image 2
Image 2 is coming from dreamscapes.html it is sub sub category from Theme