我需要将'Mage_Sales_Model_Order :: STATE_COMPLETE'添加到'零小计结账'付款方式i system->配置中的状态下拉列表中。并将完成作为该付款方式的默认值。我试图覆盖'Mage_Adminhtml_Model_System_Config_Source_Order_Status_Newprocessing'。但我无法这样做。任何人都可以告诉我我需要做什么。
谢谢。
答案 0 :(得分:0)
我做到了,我犯了一个错误。以下是正确的方法;
config.xml中
<config>
<models>
<adminhtml>
<rewrite>
<system_config_source_order_status_newprocessing>My_Module_Model_Adminhtml_System_Config_Source_Order_Status_Newprocessing</system_config_source_order_status_newprocessing>
</rewrite>
</adminhtml>
</models>
</config>
Newprocessing.php
class My_Module_Model_Adminhtml_System_Config_Source_Order_Status_Newprocessing extends Mage_Adminhtml_Model_System_Config_Source_Order_Status_Newprocessing
{
protected $_stateStatuses = array(
Mage_Sales_Model_Order::STATE_NEW,
Mage_Sales_Model_Order::STATE_PROCESSING,
Mage_Sales_Model_Order::STATE_COMPLETE
);
}
答案 1 :(得分:0)
我决定通过在本地池中创建文件来解决此问题。无需创建扩展,并且覆盖就像魅力一样:
应用程序/代码/本地/法师/ Adminhtml /型号/系统/配置/源/订购/状态/ Newprocessing.php
<?php
/**
* Order Statuses source model
*/
class Mage_Adminhtml_Model_System_Config_Source_Order_Status_Newprocessing extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
{
protected $_stateStatuses = array(
Mage_Sales_Model_Order::STATE_NEW,
Mage_Sales_Model_Order::STATE_PROCESSING,
Mage_Sales_Model_Order::STATE_COMPLETE,
);
}
希望它有所帮助。