Is it possible to overwrite Magento core functionality in this way? -

Mage_Sales_Block_Order_Total {

    protected function _initTotals(){
    //this is core 

and overwrite it with this -

//This Totals class path would be Mage_Sales_Block_Order_Totals
//but in local codePool
//now is there a need to create a rewrite in config.xml and register module 
//in app/etc/ if I would do it this way? Since local codePool is loaded 

Totals extends Mage_Sales_Block_Order_Totals {

    protected function _initTotals(){
    //changed core functionality

This has been asked before and even something I had to iron out.

This link should help: Override Magento Class Community Code Pool.

This is a nice tutorial that covers what to do as well: https://sherocommerce.com/how-to-override-rewrite-classes-in-magento/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.