Calling to functions of Magento

Posted on Updated on

On your Config.xml

<?xml version=”1.0″?>
<config>
<modules>
<MyNamespace_MyModule>
<version>0.1.0</version>
</MyNamespace_MyModule>
</modules>
<global>
<helpers>
<module>
<class>MyNamespace_MyModule_Helper</class>
</module>
</helpers>

<models>
<module>
<class>MyNamespace_MyModule_Model</class>
</module>
</models>

</global>
</config>

Calling Model
Mage::getModel(‘module/modelname’)->callYourfunction();

calling Helper
Mage::helper(‘module’)->callYourfunction();

Advertisements