douzi8127 2016-04-04 06:21
浏览 14

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

Hye, I would like to ask, how to add a new field in configuration extend from core. example i want to put a new field call test in system->configuration->general->store information.

I know is wrong, but this is the file that i use:-

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条回答 默认 最新

  • duanhe2027 2016-04-04 07:27
    关注
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度