System.xml – How to Remove Section from System.xml File

system.xml

System.xml file consist of different sections. Now I want to remove particular section from it

I tried by creating module in etc folder and system file in local folder but in vain.

For e.g I want to remove "gift options" from Sales configuration page in admin panel. how to remove it..?

I dont want to do from core folder

Is there any other way of doing this?

Best Answer

Use this code it worked for me

app\etc\modules\Myname_Mymodule.xml

<?xml version="1.0"?>
<config>
    <modules>
         <Myname_Mymodule>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_GiftMessage />
            </depends>
        </Myname_Mymodule>
    </modules>
</config>

app\code\local\Myname\Mymodule\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Myname_Mymodule>
            <version>0.0.1</version>
        </Myname_Mymodule>
    </modules>
</config>

app\code\local\Myname\Mymodule\etc\system.xml

<?xml version="1.0"?>
<config>
    <sections>
        <sales>
            <groups>
                <gift_options translate="label" module="giftmessage">
                    <label>Gift Options </label>
                    <frontend_type>text</frontend_type>
                    <sort_order>100</sort_order>
                    <show_in_default>0</show_in_default>
                    <show_in_website>0</show_in_website>
                    <show_in_store>0</show_in_store>
                 </gift_options>
            </groups>
        </sales>
    </sections>
</config>
Related Topic