I know that if I add a helper to my module I need to declare it in config.xml using:


But, what if I want to add more helpers, how do I tell Magento about their existence?

2 Answers 2




to the config.xml you are not defining one helper.

You just define alias for calling helpers using Mage::helper('helper_alias') method.

According to magento code convention module name is used as helper's alias.

Actually in tag you are defining helper prefix which will be associated with helper alias.


Mage::helper('helper_alias') is the same as new Namespace_Module_Helper_Date.

If you want to call some other helper.

For example Namespace_Module_Helper_Otherhelper, you just new to call


Update: How to rewrite helper?

In config.xml you can rewrite any existing magento helpers.

For example if you want to rewrite Mage_Catalog_Helper_Product_Compare you need to add


Hope that will help you.

  • What if I want to add/rewrite a helper in a 'sub-namespace' (not quite sure how to call it), say Mage_Catalog_Helper_Product_Compare? Would <class>Mynamespace_Mymodule_Helper> include this as well? How would I call it?
    – fuumind
    Feb 16, 2014 at 20:43
  • 1
    Answer was updated. Feb 16, 2014 at 21:00

In my case I had to rewrite two helpers:

  1. enterprise_wishlist module helper

  2. mage_wishlist module helper

In my config.xml I have added:


Also don't forget to add:

  1. Helper/Data.php

    class Namespace_Modulename_Helper_Data extends Enterprise_Wishlist_Helper_Data
  2. Helper/Shared/Data.php

    class Namespace_Modulename_Helper_Shared_Data extends Mage_Wishlist_Helper_Data

In this way you can change.

  • Please check before editing @7ochem if the code is correct then editing is not acceptable. Nov 27, 2015 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.