Fixed: Error display static block not right on the each of category when filter in shop by

Issue:

Error display static block not right on the each of category when filter in block ‘Shop by’ on left side bar

Solution:

Please go to go to app/code/core/Mage/Catalog/Model/Layer/Filter and open item.php and find:

public function getUrl()
    {
        $query = array(
            $this->getFilter()->getRequestVar()=>$this->getValue(),
            Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null // exclude current page from urls
        );
        return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
    }

=> change to:

/*public function getUrl()
    {
        $query = array(
            $this->getFilter()->getRequestVar()=>$this->getValue(),
            Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null // exclude current page from urls
        );*/
        //return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
    /*}*/

public function getUrl()
    {

        if ($this->getFilter() instanceof Mage_Catalog_Model_Layer_Filter_Category) {
            $category = Mage::getModel('catalog/category')->load($this->getValue());
            $query = array(
                $this->getFilter()->getRequestVar()=>$this->getValue(),
                Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null // exclude current page from urls
            );

            return $category->getUrl() . '?cat=' . $query['cat'];
        } else {

            $query = array(
                $this->getFilter()->getRequestVar()=>$this->getValue(),
                Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null // exclude current page from urls
            );
            return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
        }
    }

p/s: refer detail here: http://vipinsahu.com/shop-by-category-in-magento-homepage