首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Magento 1.7 -覆盖system.xml

Magento 1.7 -覆盖system.xml
EN

Stack Overflow用户
提问于 2013-03-07 16:57:07
回答 1查看 2.7K关注 0票数 1

我想只向特定的客户群显示付款方式,因此我想在后端付款方式中添加一个配置字段。我尝试在我的自定义模块中覆盖Mage_Payment system.xml:

MyNamespace_OverwriteCfg.xml

代码语言:javascript
复制
<config>
    <modules>
        <MyNamespace_OverwriteCfg>
            <active>true</active>
            <codePool>local</codePool>
        </MyNamespace_OverwriteCfg>
    </modules>
</config>

system.xml:

代码语言:javascript
复制
<config>
<sections>
    <payment>
        <groups>
            <invoice>
                <fields>
                    <specificgroup translate="label">
                        <label>Payment on specific customer groups</label>
                        <frontend_type>multiselect</frontend_type>
                        <sort_order>51</sort_order>
                        <source_model>adminhtml/system_config_source_customer_group</source_model>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </specificgroup>
                </fields>
            </invoice>
        </groups>
    </payment>
</sections>
</config>

如果我将这个添加到支付核心system.xml中,它工作得很好,但我不会编辑核心文件,但覆盖将不起作用。

EN

回答 1

Stack Overflow用户

发布于 2013-03-07 18:00:19

代码语言:javascript
复制
<config>
   <sections>
        <payment>
            <groups>
                <cashondelivery> <!--Here was the mistake -->
                    <fields>
            //...
                    </fields>
                </cashondelivery> <!--Here was the mistake -->
            </groups>
         </payment>
    </sections>
</config>
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15266817

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档