我有这段代码
$updateOrder->setState(Mage_Sales_Model_Order::STATE_PENDING, true);
$updateOrder->save();
错误是
Fatal error: Undefined class constant 'STATE_PENDING' in
答案 0 :(得分:1)
STATE_PENDING
课程中没有常数Mage_Sales_Model_Order
。它是STATE_PENDING_PAYMENT
。
将您的代码更改为:
$updateOrder->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true);
答案 1 :(得分:0)
班级没有待定状态。我想你可以使用STATE_PENDING_PAYMENT
const STATE_NEW = 'new';
const STATE_PENDING_PAYMENT = 'pending_payment';
const STATE_PROCESSING = 'processing';
const STATE_COMPLETE = 'complete';
const STATE_CLOSED = 'closed';
const STATE_CANCELED = 'canceled';
const STATE_HOLDED = 'holded';
const STATE_PAYMENT_REVIEW = 'payment_review';