1

特定の顧客グループにのみ支払い方法を表示したいので、バックエンドの支払い方法に構成フィールドを追加したいと考えています。カスタム モジュールで Mage_Payment system.xml を上書きしようとしました。

MyNamespace_OverwriteCfg.xml

<config>
    <modules>
        <MyNamespace_OverwriteCfg>
            <active>true</active>
            <codePool>local</codePool>
        </MyNamespace_OverwriteCfg>
    </modules>
</config>

システム.xml:

<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 に追加すると正常に動作しますが、コア ファイルは編集しませんが、上書きは機能しません。

4

1 に答える 1

3

The solution was, i simply had a mistake in my xml node structure. To add a field to "cash on delivery" of course it has to be like this:

<config>
   <sections>
        <payment>
            <groups>
                <cashondelivery> <!--Here was the mistake -->
                    <fields>
            //...
                    </fields>
                </cashondelivery> <!--Here was the mistake -->
            </groups>
         </payment>
    </sections>
</config>
于 2013-03-07T10:00:19.257 に答える