I’ve been working on extending Magento’s code with additional functions and blocks in a MyCompany module but I’m running into some problems. After lots of digging through the wiki and the forums I’m finding a number of sets of conflicting instructions for modifying (or not) etc/local.xml, etc/modules/MyCompany.xml, code/local/MyCompany/Catalog/Block/Navigation/Featured.php, and the config.xml file that resides in an etc directory somewhere along the path just mentioned (it seems to vary in different instruction sets). Once I get a single example working, I can take it from there, but I haven’t made it to that point so for now I’m simply working on extending Mage_Catalog_Block_Navigation with a new function that simply returns a text string (the database query I’ve written can go in later).
Could someone please either point me to a clear list of what needs to be done to add a new function and block or give me a quick “best practices” outline? For example, should local.xml be modified? Some tutorials do it, some don’t. The same with the etc/modules/MyCompany.xml file. Where should the module declaration go? I’m also very confused at this point about the naming scheme and when and how far it is required to list the path to the function in the config files.
Here is the list of tutorials and threads I’ve been working from and which approaches I’ve tried, all without luck:
There seems to be a lot of guesswork going on and I think there are certain organizational changes between versions that may be responsible for the conflicting approaches. Can anybody help me out here with a definitive list of steps?