I've made a new module called test_helper
and I want to create a helper class in this module so that I can add custom functions to be called all over my site.
I can't however seem to find any examples of just how to go about doing this. I assume I have to create some extra xml in config and ad another file somewhere that extends a base helper but I've not had any luck finding an example to build upon.
Best Answer
Your module naming convention is quite confusing - you're calling the module itself helper? For the purpose of explaining, I'm choosing to call your module
myname_mymodule
In your module
./app/code/community/MyName/MyModule/etc/config.xml
, within the<global>
tagsThen create the file
./app/code/community/MyName/MyModule/Helper/Data.php
Then to call that module, you would use