1

我正在介绍教程,但我遇到了第一个小问题。虽然新方法出现在管理列表和结帐页面中,但它没有获得默认标题。

我还查看了“内置”支付方式的核心配置文件,但看不出有什么区别。

有什么想法吗?

(我正在运行 Magento 1.7)

这就是我尝试向 magento 指示结帐的默认标题的方式

<default>
        <payment>
            <globalpay>
                <active>1</active>
                <model>globalpay/pay</model>
                <order_status>processing</order_status>
                <title>Pay Method</title>
                <allowspecific>0</allowspecific>
            </globalpay>
         </payment>
    </default>

这就是我在 Magento 的管理部分声明该字段的方式

 <title translate="label">
                            <label>Title</label>
                            <comment>Insert a custom title for this payment method</comment>
                            <frontend_type>text</frontend_type>
                            <sort_order>3</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </title>
                        <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>2</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>

我还尝试删除该字段(第二个片段),认为虽然我不知道如何为其设置默认值(顺便说一句,我该怎么做? - 可能它应该在设置时存储在 db 中,或者它可以由模型通过 source_model 标签提供服务吗??)但它不起作用。

谢谢!

4

0 回答 0