Create Global Function In Magento

Global function stands for “A function which is accesible every where in application”.When we will developing an application normally at structure time we will see some functions are common to some modules, Magneto provide helper class to create common function and access with help of helper class instance.
We will define a function in module helper file and use it everywhere in application.

step 1: Register Module under app/etc/modules/phpflow.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
< ?xml version=“1.0??>
<config>
<modules>
<namespace_phpflow>
<active>true</active>
<codepool>local</codepool>
</namespace_phpflow>
</modules>
</config>

Continue reading …