Posted by | 1 Comments
Posted on: June 22nd, 2011

[FIX] Invalid method Mage_Catalog_Block_Product_List_Toolbar



If you are getting any such error in your Magento site,

Invalid method Mage_Catalog_Block_Product_List_Toolbar::isLastPage(Array
(
)
)

Then here is the solution :
Goto /app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php :

Open the file in a code editor.

There you will find the following entry:

Mage_Catalog_Block_Product_List_Toolbar class extends Mage_Core_Block_Template

Just change it to :

Mage_Catalog_Block_Product_List_Toolbar class extends Mage_Page_Block_Html_Pager 

If the above doesnt work, then try this another method :

Goto app/code/core/Mage/Core/Block/Template.php and find this code :

public function getCacheKeyInfo()
    {
        return array(
            'BLOCK_TPL',
            Mage::app()->getStore()->getCode(),
            $this->getTemplateFile(),
            'template' => $this->getTemplate()
        );
    }

Just below that, paste this code :

public function isLastPage()
    {
        return $this->getCollection()->getCurPage() >= $this->getLastPageNum();
    }
Related Articles
    None Found
1 Response
  • #1 On February 12th, 2012 @ 12:50 pm
    Ansad says:

    Thanks for the help. It helps me to fix the site issue occurred after upgrading it from 1.3 to 1.6.2. Thanks man.. :)

    Reply
Leave your response:

Name (Required)

Email (Required)

Website (Optional)