In this blog tutorial, i will explain how to override magento blocks using an XML- based configuration file. Config.xml is module configuration file in which we will override magento block.
As magento best practices, we should not change any core files to implement custom features because it is a bad programming if core files are modified.
Create config.xml file of custom module.
Path: "app/code/local/My/Pant/etc/config.xml" and paste the following contents in that file.