I have a problem to rewrite/override
Mage_Catalog_Block_Product_List_Toolbar.
Here is my code:
etc/modules/Codesky_CatalogProduct.xml
<?xml version="1.0"?>
<config>
<modules>
<Codesky_CatalogProduct>
<active>true</active>
<codePool>local</codePool>
</Codesky_CatalogProduct>
</modules>
</config>
config.xml
<?xml version="1.0"?>
<config>
<modules>
<Codesky_CatalogProduct>
<version>0.0.1</version>
</Codesky_CatalogProduct>
</modules>
<global>
<blocks>
<catalogproduct>
<class>Codesky_CatalogProduct_Block</class>
</catalogproduct>
<catalog>
<rewrite>
<product_list_toolbar>Codesky_CatalogProduct_Block_Product_List_Toolbar</product_list_toolbar>
</rewrite>
</catalog>
</blocks>
</global>
</config>
Codesky_CatalogProduct_Block_Product_List_Toolbar.php
class Codesky_CatalogProduct_Block_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
{
/**
* Retrieve available limits for current view mode
*
* @return array
*/
public function getAvailableLimit()
{
return array(30 => 30, 60 => 60, 90 => 90);
}
}
Why it's not working. Magento still use method getAvailableLimit() from core file.