I'm having trouble figuring out how to create a helper class with a function in it that's available to *.phtml files.
Can someone describe step by step how I can make the function prtHelloWorld() available to all my *.phtml files?
it's rather simple and you have to call your helper from template like this:
Mage::helper('yourmodule/yourclassfile')->prtHelloWorld();
Default helper class is Data and this defaults to Yourmodule/Helper/Data.php
Mage::helper('yourmodule')->prtHelloWorld();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With