magento - create a global function -


i want create function can accessed *.phtml files. should place function in magento framework?

you should create module , helper class in module (usually mycompany_mymodule_helper_data default). then, add function helper class. can function in phtml this:

mage::helper("mymodule")->somefunction(); 

hope helps!

thanks, joe


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -