Open your appcodelocal<Namespace><module>etcsystem.xml
If file is not there, create one as stated below.
<?xml version="1.0" ?>
<config>
<tabs>
<mynew_tab module="<module>" translate="label">
<label>Custom Configuration</label>
<sort_order>100</sort_order>
</mynew_tab>
</tabs>
</config>
These lines will create a new tab in the left hand menu of the configuration page.
Now add following lines to the file:
<sections>
<customconfig module="<module>" translate="label">
<label>Configuration</label> <!-- Name of the submenu in the 'Custom Configuration' tab -->
<sort_order>200</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website> <!-- Whether to show the options on website page -->
<show_in_store>1</show_in_store> <!-- Whether to show the options on store page -->
<tab>mynew_tab</tab>
</customconfig>
</sections>
These lines will add a new submenu to our configuration tab.
Now add following lines to it:
<sections>
<customconfig module="<module>" translate="label">
.....
<groups> <!-- It will add a new group of options on the configuration page -->
<custom_group translate="label"> <!-- Name of the option group -->
<label>My Custom Configurations</label>
<comment>This is example of custom configuration.</comment>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</custom_group>
</groups>
</customconfig>
<sections>
Now write these lines:
<sections>
<customconfig module="<module>" translate="label">
.....
<groups>
<custom_group translate="label">
.....
<fields> <!-- This section will add new options to our group -->
<custom_email translate="label tooltip comment"> <!-- New option created here -->
<label>Is Enabled</label> <!-- Text to be displayed-->
<frontend_type>select</frontend_type> <!-- Input type of option -->
<source_model>adminhtml/system_config_source_yesno</source_model> <!-- Predefined model in core -->
<sort_order>0</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Enable this module</comment> <!-- Help text for the option -->
</custom_enabled>
<custom_name translate="label tooltip comment">
<label>Sender Email</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Email address of the user.</comment>
</custom_name>
</fields>
</custom_group>
</groups>
</customconfig>
</sections>
Now the complete code may look like this:
<?xml version="1.0" ?>
<config>
<tabs>
<mynew_tab module="fancyfeedback" translate="label">
<label>Custom Configuration</label>
<sort_order>100</sort_order>
</mynew_tab>
</tabs>
<sections>
<customconfig module="fancyfeedback" translate="label">
<label>Configuration</label>
<sort_order>200</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<tab>mynew_tab</tab>
<groups>
<custom_group translate="label">
<label>My Custom Configurations</label>
<comment>This is example of custom configuration.</comment>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<custom_enabled translate="label tooltip comment">
<label>Is Enabled</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>0</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Enable this module.</comment>
</custom_enabled>
<custom_email translate="label tooltip comment">
<label>Sender Email</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Email address of the user.</comment>
</custom_email>
</fields>
</custom_group>
</groups>
</customconfig>
</sections>
</config>
But when you try to access this page at this time it may show you ‘Access Denied’ error. To remove this error open appcodelocal<Namespace><module>etcadminhtml.xml and write following lines:
<?xml version="1.0" ?>
<config>
<acl>
<resources>
<admin>
<children>
<system>
<children>
<config>
<children>
<customconfig translate="title" module="fancyfeedback">
<title>Custom Configuration</title>
<sort_order>100</sort_order>
</customconfig>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</config>
Now logout from the admin section and login again. This is important to access this new configuration page otherwise ‘Access Denied’ error will continue to persist.
This is all to add new configuration page to your admin page. But now you may need to access the options that you just saved with your configuration page. To access them write:
Mage::getStoreConfig('customconfig/custom_group/custom_email');/*name of section, name of group, name of option*/
In some cases you may need to set a default value of the options. Don’t worry, we have a solution for that also. Open appcodelocal<Namespace><module>etcconfig.xml and add following code:
<default>
<customconfig>
<custom_group>
<custom_enabled>1</custom_enabled> <!-- Enabled by default-->
<custom_email>bhardwajsonheight@gmail.com</custom_email> <!-- set default email address -->
</custom_group>
</customconfig>
</default>
thanx guys for your support
i learn so many things from your site
regards,
Chirag Nandaniya
Thanks Chirag:)
hi arvind,
its not working for me, not show custom configuration tab
Very nice tutorial.
Thanks for sharing.
Really enjoyable post and truly i inspired from this write up. Thanks and keep sharing.
I have read this post.It’s really awesome.I have noted some point which make this post excellent. I hope you will keep continue to write other informative and interesting post.Thank you.
nice post,i like it very much,but i think u can think it in another way then,cause it will be interesting
Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!..
I was looking for such kind of post since a long time to understand this topic in well manner. Now I am satisfied and got lots of thing after visiting this post.
I am very glad with your blog. It’s really very interesting post full of valuable information very well written by u. The key part of this post is its descriptive way to define anything. I liked it with my heart. This post is a excellent example of such kind of thread.
Escorts in Gurgaon
How to check admin functionality .. Url for admin module ?
You need to go to System -> Configurations.
Here you can see the new tab on left hand side.
I am for the first time here. I found this board and I find It really useful & it helped me out a lot. I hope to give something back and help others like you aided me.
Its really very interesting post full of valuable information. The key part of this post is its descriptive way to define anything.
Mumbai escorts
chennai escorts
bangalore escorts
chandigarh escorts
Nice and let me tell one thing that it not my hobby to post comment on other blogs but you written it very well so i made up my mind to post comment.
escorts in delhi
delhi escorts
delhi escorts service
It’s Nice post, This post is a excellent example of such kind of story.
Bangalore Escorts
Escorts in Bangalore
Audi
A3 2005-2006
MB91F366_93C86
A3 2007-
CDC3217_97
A8 2005-
MB91F366_93C86
R8
CDC3217_97
TT 2007-
CDC3217_97
AK-47
This is very attention-grabbing, You’re an excessively professional blogger. I have joined your feed and look forward to in the hunt for extra of your excellent post. Additionally, I have shared your web site in my social networks. escorts in delhi
go to System -> Configurations.
Here you can see the new tab on left hand side.
nothing happen. what will i do?
Nice Post it work fine..!!!!!!!
Nice Post it work Fine..!!!!!!!
Asalamualaikum sir i have done as u said its shown also + i have changed the module name accordingly but when i changed the value of “is enabled” to no the module still shows at front end ????
Asalamualikum
sir i have done as u said . now its shoeing at the admin side. and i have also changed the module names accordingly but when i change the value of “is enabled” to no it still shows the module at the front end ???
Arvind
many thnx for this very informative post
i find it very informative
i am very inspired to use this very informative post to write better for magento
best
Raj Patel
I use this for create custom configuration options of my website and believe it this is great tutorial for me. I have learn so many things from that. Giving thanks to you for sharing such an wonderful piece of knowledge.
Thanks for the tutorial, it’s very helpful
Top 5 Cheap Magento web hosting
Hi,
Your tutorials are simply awesome…
But this one is not working for me.. i want to create a theme options page for the site. so i used the module name “Themeoptions” and my namespace is “Acodez”. using capitalize text in xml file makes any issue??? since my module name is in Capitalize, i used it.. is that the reason?
i logout and login site many times..also tried clear cache, refreshing index management etc.but its not working.. ๐
Please reply me..
Lots of Thanks in advance ๐
Hi,
Its hard to guess the exact reason without having a look at the code.
But yes, Linux is case sensitive. If you are on windows, that should not be a problem.
Thanks.
Hi,
Thanks for your reply.. i deleted all my files and created a new module…this one works for me.. i have no idea abt the issue. But now its working fine.. ๐
i guess its something with the spelling or something.. ๐
anway thanks for your tutorial.. ๐
Good to know:)
Hi,
Your tutorials are just awesome. For a beginner like me, this site is very useful.
But this one is not working for me. Newly created configuration menus, sections etc are not displaying in the backend. I want to create a theme options page for this site. for that i have created a module called “Themeoptions” . since i used the capitalized name, i have used the same name for “” in the code. is that the reason for this issue??
please reply me..
A Lots Of Thanks In Advance ๐
Hi,
One more thing.. I am using Magento ver. 1.9.0.1. Please reply me…..
what a grate page….