In the last post I have showned , how to add new Tab in magento admin panel. Now in this post I will add new Tab under System->Configuration.To add so, You need to create a new module. Click here to create an admin Module then make some changes which is written here.
create a system.xml file inside etc folder of your module, Then write the following code to add a tab
<?xml version="1.0"?>
<config>
<tabs>
<systab translate="label" module="systab">
<label>System Configuration Tab</label>
<sort_order>200</sort_order>
</systab>
</tabs>
<sections>
<systab translate="label" module="systab">
<class>separator-top</class>
<label>My system Configuration Tab</label>
<tab>systab</tab>
<sort_order>100</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<systab_option translate="label">
<label>sysem Tab Options</label>
<frontend_type>text</frontend_type>
<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>
<registration_mode translate="label"> <label>On New User Signup</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<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>
</registration_mode>
<forget_mode translate="label">
<label>Send Email on Forget Password</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<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>
</forget_mode>
<purchase_mode translate="label">
<label>Send Email On Product Purchase</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<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>
</purchase_mode>
</fields>
</systab_option>
</groups>
</systab>
</sections>
</config>
Now important things which needs to do. Go to your System->Cache Management then clear your all cache. Now go to System->Permissions->Roles. Clcik on Administrators, from Role Resources Tab select Resource Access All from the drop down and save. Now go to System ->Configuration .You can see a new tab has added in the left side.
No comments:
Post a Comment