Welcome

diaper cake

Magento® System Configuration

How to create Magneto System Configuration Settings??

  • Step 1. Create global configuration File
  • Step 2. Create module configuration file
  • Step 3. Create helper class
  • Step 4. Create System configuration file

 

Step 1. Each Module should have one Namespace & Module name. Name space could be some company name etc. & module name should be something that represents module functionality. So let suppose Namespace is ExtendTree and Module name is ConfigurationSettings. Now Create Global Configuration File inside root directory /app/etc/modules as name "ExtendTree_ConfigurationSettings.xml"

 

<?xml version="1.0" encoding="UTF-8"?> <config> <modules> <ExtendTree_ConfigurationSettings> <active>true</active> <codePool>local</codePool> </ExtendTree_ConfigurationSettings> </modules> </config>

 

Step 2. Now Create Module Configuration File inside the directory /app/code/local/ExtendTree/ConfigurationSettings/etc as name "config.xml"

 

<config> <modules> <ExtendTree_ConfigurationSettings> <version>0.0.1</version> </ExtendTree_ConfigurationSettings> </modules> <adminhtml> <acl> <resources> <all> <title>Allow Everything</title> </all> <admin> <children> <system> <children> <config> <children> <extendtree> <title>ExtendTree</title> </extendtree> </children> </config> </children> </system> </children> </admin> </resources> </acl> </adminhtml> <global> <helpers> <configurationSettings> <class>ExtendTree_ConfigurationSettings_Helper</class> </configurationSettings> </helpers> </global> </config>

 

Step 3. Now next thing is to create helper inside the directory /app/code/local/ExtendTree/ConfigurationSettings/Helper/ as name "Data.php"

 

class ExtendTree_ConfigurationSettings_Helper_Data extends Mage_Core_Helper_Abstract { }

 

Step 4. Now last thing is to create system configuration file inside the directory /app/code/local/ExtendTree/ConfigurationSettings/etc/ as name "System.xml"

 

<config> <tabs> <extendtree translate="label" module="configurationSettings"> <label>ExtendTree</label> <sort_order>0</sort_order> </extendtree> </tabs> <sections> <extendtree translate="label" module="configurationSettings"> <label>ExtendTree Section</label> <tab>extendtree</tab> <frontend_type>text</frontend_type> <sort_order>40</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> <groups> <extendtree_groups translate="label"> <label>ExtendTree Group</label> <frontend_type>text</frontend_type> <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> <fields> <extendtree_field1 translate="label"> <label>Test Field 1</label> <comment><![CDATA[This is Text Field 1]]> </comment> <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> </extendtree_field1> <extendtree_field2 translate="label"> <label>Test Field 2</label> <comment><![CDATA[This is Text Field 2]]> </comment> <frontend_type>select</frontend_type> <source_model>adminhtml/system_config_source_yesno</source_model> <sort_order>2</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </extendtree_field2> <extendtree_field3 translate="label"> <label>Test Field 3</label> <comment><![CDATA[This is Text Field 3]]> </comment> <frontend_type>textarea</frontend_type> <sort_order>3</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </extendtree_field3> </fields> </extendtree_groups> </groups> </extendtree> </sections> </config>

 

That's it..!! Now go toAdmin->System->Configuration. Here you should see the tab as "ExtendTree"

 

Click here to get this module for free.

 

 

Thank you..!!

"The easy way for everything."