I have a custom module that is working just fine but I would like to be able to store variables in the config so I can use them in my code. (For example a default error message)
I think I can access them by using Mage::getStoreConfig('/some/path/here'); but I don't know how to add them to the modules config.xml (myname/mymodule/etc/config.xml) so that I can use them in my code?
Anyone have a clue? Thanks!
Reading these two articles should give you the information you need to add your own custom configuration variable, which will automatically give you a UI to enter values in the Admin.
If you want to set a default value for your new configuration variables, there's a top level
config.xml
node nameddefault
which will let you do that. Consider the followingThis structure in
config.xml
sets default values for the following config variables