If I want to add a custom configuration node in my modules config.xml, how would I go about this and how to retrieve the values?

I do not want store configuration, just a node in my modules configuration file where I can put some variables that my module needs.

Also is there any best practices for doing this?

1 Answer 1


There is no need to add a system.xml to have a node in the configuration.

You can take the configuration wherever you want it. If you want an easy way to retrieve it and it doesn't feel wrong, just put it in:


Then you can retrieve this setting with:


The alternative is to put it wherever you want it, like the fieldsets in the Mage_Sales config.xml:


Then you need to use:

  • Quick and easy solution that I didn't know, thanks!
    – Kenny
    Sep 2, 2013 at 13:15
  • I like "and it doesn't feel wrong" - thats programmer's intuition right there
    – Deus777
    Jun 16, 2017 at 8:21

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.