Magento Coding

Way to create configuration settings for your Magento extension

My Tech Blog

Assuming you have knowledge on module creation!…

Step1: In your etc folder add system.xml file in this

===============================================================

To void permissions problem.

Step2: You need to add below xml in your extension config.xml file.

================================================================================

Below is the way to retrive values from above settings.

Mage::getStoreConfig(‘modulename/modulename_group/modulename_input’,Mage::app()->getStore());
Mage::getStoreConfig(‘modulename/modulename_group/modulename_select’,Mage::app()->getStore());

We will go little more in to it.
Ex: if we want to custom values other than just Yes/NO in the sorce model we have that also by doing below.

Create model in your module like

And add below tag in system.xml
<source_model>modulename/modelname</source_model>
instead of
<source_model>adminhtml/system_config_source_yesno</source_model>

We have few other default source_models available in the system like.
<source_model>adminhtml/system_config_source_enabledisable</source_model>

We have frontend_model also as below
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>

For file upload add below.

<backend_model>adminhtml/system_config_backend_file</backend_model>
<upload_dir>var/uploads</upload_dir>

Below is the reference of different field type we have in the system.

View original post

Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s