Let's talk Contact us. No cost. No obligation.

Fill out this form and we will contact you with in 24 hrs.

captcha

1+9=? 

 

Knowledge Base

How to overwrite system.xml file in magento / add custom field in configuration

June 9, 2017

Sometimes it is needed to add custom field in config. For example if you want to add Minimum amount for surcharge in config, you need to follow below steps-

Step1: Create a module by which we can overwrite system.xml file,Bellow is module file

Path: app/etc/modules/Onsis_Overwriteconfig.xml

Content :




true
local


Onsis : Namespace
Overwriteconfig : Module name

Step2: Then create bellow file.
Path: app/code/local/Onsis/Overwriteconfig/etc/system.xml
Content :






text
100
1
1
0



In the above system.xml file, i have added “min_amount_for_surcharge” which will show in bellow path.

admin->system->configuration->Payment Methods -> Cash On Delivery -> Minimum amount for surcharge

Also we can get value of Minimum amount for surcharge using bellow code

Mage::getStoreConfig(‘payment/cashondelivery/min_amount_for_surcharge’);

About Pramod Gupta

Pramo Gupta http://www.google.com