Why can not extend core block with below configs?!

file config.xml modified

URL : app/code/community/Mycompnay/Mymodule/etc/config.xml


file Shipping.php to extend

URL : app/code/community/Mycompany/Mymodule/Block/Cart/Shipping.php

class Mycompany_Mymodule_Block_Cart_Shipping extends Mage_Checkout_Block_Cart_Shipping
    public function getCityActive()
        return (bool)Mage::getStoreConfig('carriers/mymodule/active');

1 Answer 1


Looking briefly at your configuration, you're trying to create a rewrite for a block in the checkout group, and that block's name is block_cart_shipping


In other words, block that instantiated like


There's no such block in Magento. You're probably looking for


Also, this answer will show you where Magento swaps out the standard class name for a rewritten one, and is where you'll want to focus your debugging efforts.

  • Great Alan, but really I don't know, why you said that block is not available ? I can see this block in app/code/core/Mage/Checkout/Block/Cart/Shipping.php
    – sIiiS
    Commented Mar 12, 2014 at 20:57
  • Where is a block with the class/type of checkout/block_cart_shipping instantiated in the system? Commented Mar 12, 2014 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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