2

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?

2 Answers 2

2

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>
10
  • I have written same code but its not working....I am not getting why it is still visible
    – Donika
    Commented Oct 7, 2015 at 9:56
  • Please clear cache and then try make sure all files will be on right palace.
    – Arunendra
    Commented Oct 7, 2015 at 9:58
  • cache is already disable..I have cleared browser cache also then to it is visible
    – Donika
    Commented Oct 7, 2015 at 10:18
  • Can you share your codes here along with file path ??
    – Arunendra
    Commented Oct 7, 2015 at 10:30
  • I have written same code which you have given in the same file path which you have mention
    – Donika
    Commented Oct 7, 2015 at 10:33
8

system.xml can not be override but you can hide section by creating module
put below code in your modules system.xml file

<?xml version="1.0"?>  
<config>
    <sections>
        <sales>
            <groups>
                <gift_options translate="label" module="giftmessage">                    
                    <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>

Make sure your module depends on Mage_GiftMessage

6
  • here in above code module name will be my module name??
    – Donika
    Commented Oct 7, 2015 at 7:29
  • yes name your module as you want Commented Oct 7, 2015 at 7:32
  • @Donika you can accept this answer if working fine at your end Commented Oct 7, 2015 at 7:41
  • It is still visible ..I am not getting the problem
    – Donika
    Commented Oct 7, 2015 at 9:59
  • @Donika clear cache first and check Commented Oct 7, 2015 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.