自定义PaymentMethod未出现在Magento中的配置 - >付款方式中

时间:2012-01-04 13:22:09

标签: magento module payment

我正在尝试为Magento写一个PaymentMethod 它显示模块处于配置 - >高级 但它没有在配置 - >付款方式中显示 有什么问题?
我的XML文件是:
app / etc / modules / ITProfessionals_mellatPayment.xml:

<config>
    <modules>
        <ITProfessional_MellatPayment>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Payment />
            </depends>
        </ITProfessional_MellatPayment>
    </modules>
</config

app / code / local / ITProfessionals / MellatPayment / etc / config.xml:

<?xml version="1.0"?>
<config>
    <modules>
       <ITProfessionals_MellatPayment>
          <version>0.1.0</version>
       </ITProfessionals_MellatPayment>
    </modules>

    <global>
    <blocks>
        <mellatpayment>
            <class>ITProfessionals_MellatPayment_Block</class>
        </mellatpayment>
    </blocks>

        <models>
            <mellatpayment>
                <class>ITProfessionals_MellatPayment_Model</class>
            </mellatpayment>
        </models>

        <resources>
            <mellatpayment_setup>
                <setup>
                    <module>ITProfessionals_MellatPayment</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </mellatpayment_setup>
            <mellatpayment_write>
                <connection>
                  <use>core_write</use>
                </connection>
            </mellatpayment_write>
            <mellatpayment_read>
               <connection>
                <use>core_read</use>
              </connection>
            </mellatpayment_read>
        </resources>
    </global>

    <default>
        <payment>
            <mellatpayment>
                <active>1</active>
                <model>mellatpayment/paymentMethod</model>
                <order_status>pending</order_status>
                <title>Mellat bank</title>

                <cctypes>Shetab</cctypes>
                <payment_action>authorize</payment_action>
                <allowspecific>0</allowspecific>
            </mellatpayment>
         </payment>
    </default>
</config>

app / code / local / ITProfessionals / MellatPayment / etc / system.xml:

<?xml version="1.0"?>
<config>
   <sections>
        <payment>
            <groups>
                <mellatpayment translate="label" module="paygate">
                    <label>Bank Mellat</label>
                    <sort_order>670</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>0</show_in_store>
                    <fields>
                        <active translate="label">
                            <label>Enabled</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </active>
                        <order_status translate="label">
                            <label>New order status</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_order_status_processing</source_model>
                            <sort_order>4</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </order_status>
                        <title translate="label">
                            <label>Title</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>2</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </title>
                    </fields>
                </mellatpayment>
            </groups>
        </payment>
    </sections>
</config>

0 个答案:

没有答案