Posts Tagged ‘Module’

Access getConfigData from the controller in Magento

var fbShare = {url: ‘http://sree.cc/magento_ecommerce_tips/access-getconfigdata-from-the-controller-in-magento’,size:’large’} Quick Magento tip.
If you need to access the getConfigData() function from your controller do this:
Mage::getModel(‘<name of the model for this controller>’)->getConfigData(<fieldname>);
For example if you want to call getConfigData() from the Mage_Mymodule_MyworldController controller then:
Mage::getModel(‘Mage_Mymodule_Model_Myworld’)->getConfigData(<fieldname>);