Magento-付款方式无发票现金(Mindstretch模块)
我们正在维护一个基于Magento的网店,该网店安装了Mindstretch的支付模块。我们使用的是“提货时付现”选项,但问题是该模块在发送订单时创建发票。但是,当选择“提货付现”时,不应创建发票。只有当他们真的拿起它时,才会发生这种情况。因此,我们需要禁用发票的制作。问题是我不知道从哪里开始寻找。下面是config.xml和system.xml文件Magento-付款方式无发票现金(Mindstretch模块),magento,payment,Magento,Payment,我们正在维护一个基于Magento的网店,该网店安装了Mindstretch的支付模块。我们使用的是“提货时付现”选项,但问题是该模块在发送订单时创建发票。但是,当选择“提货付现”时,不应创建发票。只有当他们真的拿起它时,才会发生这种情况。因此,我们需要禁用发票的制作。问题是我不知道从哪里开始寻找。下面是config.xml和system.xml文件 CONFIG.XML: <?xml version="1.0" encoding="UTF-8"?> <config>
CONFIG.XML:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Mindstretch_Contant>
<version>0.1.0</version>
</Mindstretch_Contant>
</modules>
<global>
<helpers>
<contant>
<class>Mindstretch_Contant_Helper</class>
</contant>
<!--
<payment>
<rewrite>
<data>Mindstretch_Contant_Helper_Data</data>
</rewrite>
</payment>
-->
</helpers>
<models>
<contant>
<class>Mindstretch_Contant_Model</class>
</contant>
</models>
<adminhtml>
<translate>
<modules>
<Mindstretch_Contant>
<files>
<default>Mindstretch_Backend.csv</default>
</files>
</Mindstretch_Contant>
</modules>
</translate>
</adminhtml>
<resources>
<contant_setup>
<setup>
<module>Mindstretch_Contant</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</contant_setup>
<contant_write>
<connection>
<use>core_write</use>
</connection>
</contant_write>
<contant_read>
<connection>
<use>core_read</use>
</connection>
</contant_read>
</resources>
</global>
<frontend>
<routers>
<contant>
<use>standard</use>
<args>
<module>Mindstretch_Contant</module>
<frontName>Contant</frontName>
</args>
</contant>
</routers>
</frontend>
<default>
<payment>
<contant>
<active>0</active>
<model>contant/paymentLogic</model>
<order_status>pending</order_status>
<title>Contant</title>
<api_key>46</api_key>
<api_secret>46</api_secret>
<payment_action>authorize_capture</payment_action>
<allowspecific>0</allowspecific>
</contant>
</payment>
</default>
</config>
0.1.0
Mindstretch\u Contant\u助手
Mindstretch\u-Contant\u模型
Mindstretch_Backend.csv
心灵伸展
核心单元设置
核心写入
核心读取
标准
心灵伸展
孔唐
0
contant/paymentLogic
悬而未决的
孔唐
46
46
授权捕获
0
SYSTEM.XML:
<?xml version="1.0"?>
<config>
<sections>
<payment>
<groups>
<contant translate="label" module="paygate">
<label>Contant</label>
<sort_order>601</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>contant/paid</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>
<allowspecific translate="label">
<label>Payment from applicable countries</label>
<frontend_type>allowspecific</frontend_type>
<sort_order>50</sort_order>
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</allowspecific>
<specificcountry translate="label">
<label>Payment from Specific countries</label>
<frontend_type>multiselect</frontend_type>
<sort_order>51</sort_order>
<source_model>adminhtml/system_config_source_country</source_model>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</specificcountry>
<min_order_total translate="label">
<label>Minimum Order Total</label>
<frontend_type>text</frontend_type>
<sort_order>98</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</min_order_total>
<max_order_total translate="label">
<label>Maximum Order Total</label>
<frontend_type>text</frontend_type>
<sort_order>99</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</max_order_total>
<sort_order translate="label">
<label>Sort order</label>
<frontend_type>text</frontend_type>
<sort_order>999</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</sort_order>
<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>
</contant>
</groups>
</payment>
</sections>
</config>
孔唐
601
1.
1.
0
启用
选择
adminhtml/system\u config\u source\u yesno
1.
1.
1.
0
新订单状态
选择
继续/支付
4.
1.
1.
0
适用国家的付款
allowspecific
50
adminhtml/system\u config\u source\u payment\u所有特定国家/地区
1.
1.
0
特定国家的付款
多选
51
adminhtml/system\u config\u source\u country
1.
1.
0
最低订单总数
文本
98
1.
1.
0
最大订单总数
文本
99
1.
1.
0
排序顺序
文本
999
1.
1.
1.
标题
文本
2.
1.
1.
0
PAYMENTLOGIC.PHP:
<?php
class Mindstretch_Contant_Model_PaymentLogic extends Mage_Payment_Model_Method_Abstract
{
/**
* Set forced canCreditmemo flag
*
* @param Varien_Event_Observer $observer
* @return Mage_Payment_Model_Observer
*/
protected $_code = 'contant';
protected $_isGateway = true;
protected $_canAuthorize = true;
protected $_canCapture = true;
protected $_canCapturePartial = false;
protected $_canRefund = true;
protected $_canVoid = true;
protected $_canUseInternal = true;
protected $_canUseCheckout = true;
protected $_canUseForMultishipping = true;
protected $_canSaveCc = false;
/*public function authorize (Varien_Object $payment, $amount)
{
}
public function capture (Varien_Object $payment, $amount)
{
}
public function refund (Varien_Object $payment, $amount)
{
}
*/
public function void (Varien_Object $payment)
{
}
}
?>
希望有人能给我一些方向去哪里看。谢谢根据您发布的配置,重要的代码在app/code/local/mindstract/Contant/Model/PaymentLogic.php中,您能发布该文件的内容吗?也许新订单状态需要为“待定”@Jonathan;用现在包含的Paymentlogic.php文件编辑了原始帖子。顺便说一句,还有一个名为Paid.php的文件,内容如下:类Mindstretch\u Contant\u Model\u Paid{public function to optionArray(){返回数组('value'=>1,'label'=>Mage::helper('adminhtml')->('value'=>0,'label'=>Mage::helper('adminhtml')->