Follow by Email

Sunday, June 16, 2013

What is Helper in Magento

Magento's Helper classes contain utility methods that will allow you to perform common tasks on objects and variables. For example:
$helper = Mage::helper('catalog');
You'll notice we've left off the second part of the grouped class name. Each Module has a default Data Helper class. The following is equivalent to the above:
$helper = Mage::helper('catalog/data');
Most Helpers inherit form Mage_Core_Helper_Abstract, which gives you several useful methods by default.

$translated_output =  $helper->__('Magento is Great'); //gettext style translationsif($helper->isModuleOutputEnabled()): //is output for this module on or off?

1 comment:

  1. Hi,

    Do you have a sample goods catalog template for Magento? if so, could you send me that on sonal.herlekar@gmail.com

    TIA!

    ReplyDelete