Php Magento新配置选项卡中的新付款方式
我想做的就是添加一个新的自定义付款方式,并使其在新的配置选项卡中可用,而不是销售/付款方式 例如,我希望在管理配置中将我的付款方式设置为CompanyName/Method1,而不是将组设置为Sales/payment Methods 我的问题出现在这里。我可以设置system.xml文件,使其下有一个新选项卡和我的模块选项。但是当我更改config.xml时,我的付款方式不再显示在chekout页面中 当我更改为自定义选项卡名称时,它无法显示在签出中。有什么想法吗Php Magento新配置选项卡中的新付款方式,php,magento,module,tabs,payment,Php,Magento,Module,Tabs,Payment,我想做的就是添加一个新的自定义付款方式,并使其在新的配置选项卡中可用,而不是销售/付款方式 例如,我希望在管理配置中将我的付款方式设置为CompanyName/Method1,而不是将组设置为Sales/payment Methods 我的问题出现在这里。我可以设置system.xml文件,使其下有一个新选项卡和我的模块选项。但是当我更改config.xml时,我的付款方式不再显示在chekout页面中 当我更改为自定义选项卡名称时,它无法显示在签出中。有什么想法吗 <default>
<default>
<payment>
<spos>
<active>0</active>
<model>spos/payment</model>
<order_status>1</order_status>
<title>SPos</title>
<payment_action>authorize</payment_action>
<allowspecific>0</allowspecific>
</spos>
</payment>
</default>
这个like将帮助您。我认为您需要显示config.xml和system.xml。我已经为此进行了尝试,我的XML如下所示: System.xml
<?xml version="1.0"?>
<config>
<tabs>
<newmodule translate="label" module="newmodule">
<label>NewModule</label>
<sort_order>200</sort_order>
</newmodule>
</tabs>
<sections>
<newmodule translate="label" module="newmodule">
<label>NewModule</label>
<tab>newmodule</tab>
<frontend_type>text</frontend_type>
<sort_order>0</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<newmodule translate="label" module="paygate">
<label>NewModule Payment</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>
</newmodule>
</groups>
</newmodule>
</sections>
</config>
Config.xml
<?xml version="1.0"?>
<config>
<modules>
<NameSpace_NewModule>
<version>0.1.0</version>
</NameSpace_NewModule>
</modules>
<frontend>
<routers>
<newmodule>
<use>standard</use>
<args>
<module>NameSpace_NewModule</module>
<frontName>newmodule</frontName>
</args>
</newmodule>
</routers>
<layout>
<updates>
<newmodule>
<file>newmodule.xml</file>
</newmodule>
</updates>
</layout>
</frontend>
<admin>
<routers>
<newmodule>
<use>admin</use>
<args>
<module>NameSpace_NewModule</module>
<frontName>newmodule</frontName>
</args>
</newmodule>
</routers>
</admin>
<adminhtml>
<menu>
<newmodule module="newmodule">
<title>NewModule</title>
<sort_order>71</sort_order>
<action>newmodule/adminhtml_newmodule</action>
<children>
<marketing module="newmodule">
<title>Marketing</title>
<sort_order>0</sort_order>
<action>newmodule/adminhtml_newmodule</action>
</marketing>
</children>
</newmodule>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<newmodule>
<title>NewModule</title>
<sort_order>1</sort_order>
<action>newmodule/adminhtml_newmodule</action>
<children>
<marketing module="newmodule">
<title>Marketing</title>
<sort_order>0</sort_order>
<action>newmodule/adminhtml_newmodule</action>
</marketing>
</children>
</newmodule>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<newmodule>
<file>newmodule.xml</file>
</newmodule>
</updates>
</layout>
</adminhtml>
<global>
<fieldsets>
<sales_convert_quote_payment>
<newmodule_id>
<to_order_payment>*</to_order_payment>
</newmodule_id>
<order_cash_value>
<to_order_payment>*</to_order_payment>
</order_cash_value>
</sales_convert_quote_payment>
<sales_convert_order_payment>
<budget_id>
<to_quote_payment>*</to_quote_payment>
</budget_id>
<order_cash_value>
<to_quote_payment>*</to_quote_payment>
</order_cash_value>
</sales_convert_order_payment>
</fieldsets>
<models>
<newmodule>
<class>NameSpace_NewModule_Model</class>
<resourceModel>newmodule_mysql4</resourceModel>
</newmodule>
<newmodule_mysql4>
<class>NameSpace_NewModule_Model_Mysql4</class>
<entities>
<newmodule>
<table>newmodule</table>
</newmodule>
</entities>
</newmodule_mysql4>
</models>
<resources>
<newmodule_setup>
<setup>
<module>NameSpace_NewModule</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</newmodule_setup>
<newmodule_write>
<connection>
<use>core_write</use>
</connection>
</newmodule_write>
<newmodule_read>
<connection>
<use>core_read</use>
</connection>
</newmodule_read>
</resources>
<blocks>
<newmodule>
<class>NameSpace_NewModule_Block</class>
</newmodule>
</blocks>
<helpers>
<newmodule>
<class>NameSpace_NewModule_Helper</class>
</newmodule>
</helpers>
</global>
<default>
<payment>
<newmodule>
<active>1</active>
<model>newmodule/payment_newmodule</model>
<order_status>processing</order_status>
<title>NewModule Payment</title>
<payment_action>authorize</payment_action>
</newmodule>
</payment>
</default>
</config>
希望这能对你有所帮助。检查这些XML并进行比较。您必须将payment/[YourGroupName]/[FieldName]节点添加到新组部分下的每个新付款字段中。
因此,您的字段在system.xml文件中类似如下:
...
<fields>
<active translate="label">
<label>Enabled</label>
<config_path>payment/method1/active</config_path>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</active>
<title translate="label">
<label>Title</label>
<config_path>payment/method1/title</config_path>
<frontend_type>text</frontend_type>
<sort_order>15</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>1</show_in_store>
</title>
.
.
.
</fields>
...
Magento中的PayPal模块是一个很好的参考,可用于检查、学习和查找付款方法的新内容。为什么您希望付款方法选项卡中不包含付款方法?因为其中包含许多其他子方法。因此,最好有一个单独的标签为这种方法谢谢你的链接。但我需要更专注于付款方式。我已经按照您提供的链接中的说明进行了操作,但是当涉及到为我的付款方式实施时,它不会显示在结帐中。