Add Custom tab in system configuration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hiremagentoHMD
    New Member
    • Mar 2013
    • 1

    Add Custom tab in system configuration

    Hello All,

    Here, I am explaining you that how to add custom tab in system -> Configuration area.
    Well, fist you need an extension that you’re going to build configuration for. If you’re new to Magento and you don’t know how to create an extension of your own, there’s a bunch of articles on this site about that, but my suggestion is to start on fresh extension, for testing.
    And now on to the fun stuff. First, you need to add (or edit) your system.xml file.

    Code:
    <?xml version="1.0" encoding="UTF-8"?> 
    <config> 
    <tabs> 
    <inchoo translate="label" module="mymodule"> 
    <label>Inchoo Extensions</label> 
    <sort_order>100</sort_order> 
    </inchoo> 
    </tabs> 
    <sections> 
    <inchoo translate="label" module="mymodule"> 
    <label>Extension Options</label> 
    <tab>inchoo</tab> 
    <sort_order>1000</sort_order> 
    <show_in_default>1</show_in_default> 
    <show_in_website>1</show_in_website> 
    <show_in_store>1</show_in_store> 
    <groups> 
    <inchoo_group translate="label" module="mymodule"> 
    <label>My Extension Options</label> 
    <frontend_type>text</frontend_type> 
    <sort_order>1000</sort_order> 
    <show_in_default>1</show_in_default> 
    <show_in_website>1</show_in_website> 
    <show_in_store>1</show_in_store> 
    <fields> 
    <inchoo_input translate="label"> 
    <label>My Input Field: </label> 
    <comment>My Comment</comment> 
    <frontend_type>text</frontend_type> 
    <sort_order>20</sort_order> 
    <show_in_default>1</show_in_default> 
    <show_in_website>1</show_in_website> 
    <show_in_store>1</show_in_store> 
    </inchoo_input> 
    <inchoo_select translate="label"> 
    <label>My Dropdown: </label> 
    <comment>Source model provider Magento’s default Yes/No values</comment> 
    <frontend_type>select</frontend_type> 
    <sort_order>90</sort_order> 
    <show_in_default>1</show_in_default> 
    <show_in_website>1</show_in_website> 
    <show_in_store>1</show_in_store> 
    <source_model>adminhtml/system_config_source_yesno</source_model> 
    </inchoo_select> 
    </fields> 
    </inchoo_group> 
    </groups> 
    </inchoo> 
    </sections> 
    </config>
    Then, in order to use Magento’s configuration section, you need to add (or edit) your extension’s config.xml file, and define models and helpers locations.

    Code:
    <config> 
    <modules> 
    <Inchoo_Mymodule> 
    <version>0.1.0</version> 
    </Inchoo_Mymodule> 
    </modules> 
    <global> 
    <models> 
    <mymodule> 
    <class>Inchoo_Mymodule_Model</class> 
    </mymodule> 
    </models> 
    <helpers> 
    <mymodule> 
    <class>Inchoo_Mymodule_Helper</class> 
    </mymodule> 
    </helpers> 
    </global> 
    </config>
    And finally, you need to edit your extension’s config.xml file again, in order to avoid “Permissio n denied.” problem.
    Insert this part of XML into inside “<config></config>” tags:
    Code:
    <adminhtml> 
    <acl> 
    <resources> 
    <all> 
    <title>Allow Everything</title> 
    </all> 
    <admin> 
    <children> 
    <system> 
    <children> 
    <config> 
    <children> 
    <inchoo> 
    <title>Inchoo - All</title> 
    </inchoo> 
    </children> 
    </config> 
    </children> 
    </system> 
    </children> 
    </admin> 
    </resources> 
    </acl> 
    </adminhtml>

    And if you’ve done everything correctly you should see in admin panel syatem -> Configuration - >left side Inchoo Extension tab.


    - Hope it will help you
    Last edited by Niheel; Mar 23 '13, 12:25 PM. Reason: Contact information in profile
  • olidev
    New Member
    • May 2017
    • 1

    #2
    I read a solution to adding custom tab in magento on magenticians blog. They have great tutorial their. You should search on this on their website.

    the problem might be here

    Code:
    <?xml version="1.0" encoding="UTF-8"?> 
    <config> 
    <tabs> 
    <inchoo translate="label" module="mymodule"> 
    <label>Inchoo Extensions</label> 
    <sort_order>100</sort_order> 
    </inchoo> 
    </tabs> 
    <sections> 
    <inchoo translate="label" module="mymodule"> 
    <label>Extension Options</label> 
    <tab>inchoo</tab> 
    <sort_order>1000</sort_order> 
    <show_in_default>1</show_in_default> 
    <show_in_website>1</show_in_website> 
    <show_in_store>1</show_in_store> 
    <groups> 
    <inchoo_group translate="label" module="mymodule"> 
    <label>My Extension Options</label> 
    <frontend_type>text</frontend_type> 
    <sort_order>1000</sort_order> 
    <show_in_default>1</show_in_default> 
    <show_in_website>1</show_in_website> 
    <show_in_store>1</show_in_store> 
    <fields> 
    <inchoo_input translate="label"> 
    <label>My Input Field: </label> 
    <comment>My Comment</comment> 
    <frontend_type>text</frontend_type> 
    <sort_order>20</sort_order> 
    <show_in_default>1</show_in_default> 
    <show_in_website>1</show_in_website> 
    <show_in_store>1</show_in_store> 
    </inchoo_input> 
    <inchoo_select translate="label"> 
    <label>My Dropdown: </label> 
    <comment>Source model provider Magento’s default Yes/No values</comment> 
    <frontend_type>select</frontend_type> 
    <sort_order>90</sort_order> 
    <show_in_default>1</show_in_default> 
    <show_in_website>1</show_in_website> 
    <show_in_store>1</show_in_store> 
    <source_model>adminhtml/system_config_source_yesno</source_model> 
    </inchoo_select> 
    </fields> 
    </inchoo_group> 
    </groups> 
    </inchoo> 
    </sections> 
    </config>

    Comment

    Working...