如何在magento的配置中添加新字段(从核心扩展)


how to add new field in configuration in magento (extend from core)

Hye,我想问一下,如何在配置中添加一个新字段从核心扩展。例如,我想在系统->配置->常规->存储信息中进行一个新的字段调用测试。

我知道这是错误的,但这是我使用的文件:-

MageCustom/GST/etc/system.xml

<config>
<tabs>
    <customer translate="label" module="customer">
        <label>dd</label>
        <sort_order>300</sort_order>
    </customer>
</tabs>
<sections>
    <customer translate="label" module="customer">
        <general>
            <groups>
                <store_information>
                    <fields>
                        <company_name>
                            <label>Company Name</label>
                            <frontend_type>text</frontend_type>
                            <comment>This will be included in Transactional Emails.</comment>
                            <sort_order>31</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>                    
                        </company_name>
                    </fields>
                    <fields>
                        <gst_no>
                            <label>GST No</label>
                            <frontend_type>text</frontend_type>
                            <comment>This will be included in Transactional Emails.</comment>
                            <sort_order>32</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>                    
                        </gst_no>
                    </fields>
                </store_information>
            </groups>
        </general>
    </customer>
</sections>

MageCustom/GST/etc/config.xml

<config>
<adminhtml>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <customer>
                                        <title>General</title>
                                    </customer>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</adminhtml>

http://www.ecomdev.org/2010/10/27/custom-configuration-fields-in-magento.html

按照这个网址,你可能会有想法。