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

时间:2016-04-04 06:21:59

标签: php magento

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

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

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>

1 个答案:

答案 0 :(得分:0)