View Full Version : How to rewrite blocks?
AndrewJohn26
05-16-2011, 06:15 AM
How to rewrite blocks?
schwa
05-30-2011, 03:34 AM
What do you mean by blocks?
mtthwsmith8
05-30-2011, 08:28 AM
For this you need to create following files as explained in the following example:
Example:
Company name: Coreover
Module Name: Catalog
File path: app\code\local\Coreover\Catalog\etc\config.xml
Config.xml file:
<?xml version="1.0"?>
<config>
.............
<global>
<blocks>
<catalog>
<rewrite>
<product_list_toolbar>Coreover_Catalog_Block_Product_List_Toolbar</product_list_toolbar>
</rewrite>
</catalog>
</blocks>
..............
</global>
............
</config>
File Path: app\code\local\Coreover\Catalog\Block\Product\List \Toolbar.php
Php file for your module :
<?php
class Coreover_Catalog_Block_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar {
//Your Code for rewriting functions
}
?>
Powered by vBulletin® Version 4.2.4 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.