여기 Magento 버전 문제가 있다고 생각하지 않습니다.
특정 상황에서 Magento는 단지 으로의 상태를 Mage_Sales_Model_Order::STATE_PROCESSING
으로 다시 전환 할 수 없습니다.
예를 들어, 보통 환불 (creditmemos)이있는 주문에는 Mage_Sales_Model_Order::STATE_PROCESSING
상태를 저장할 수 없습니다. 1.3.2.4 또는 1.6.x에서도 마찬가지입니다.
이것은 디자인입니다.
Magento가 주문 상태를 각각 STATE_COMPLETE
또는 STATE_CLOSED
으로 재설정하도록하려면 Mage_Sales_Model_Order::_checkState()
을 확인하십시오.
protected function _checkState()
{
if (!$this->getId()) {
return $this;
}
$userNotification = $this->hasCustomerNoteNotify() ? $this->getCustomerNoteNotify() : null;
if (!$this->isCanceled()
&& !$this->canUnhold()
&& !$this->canInvoice()
&& !$this->canShip()) {
if (0 == $this->getBaseGrandTotal() || $this->canCreditmemo()) {
if ($this->getState() !== self::STATE_COMPLETE) {
$this->_setState(self::STATE_COMPLETE, true, '', $userNotification);
}
}
/**
* Order can be closed just in case when we have refunded amount.
* In case of "0" grand total order checking ForcedCanCreditmemo flag
*/
elseif (floatval($this->getTotalRefunded()) || (!$this->getTotalRefunded()
&& $this->hasForcedCanCreditmemo())
) {
if ($this->getState() !== self::STATE_CLOSED) {
$this->_setState(self::STATE_CLOSED, true, '', $userNotification);
}
}
}
if ($this->getState() == self::STATE_NEW && $this->getIsInProcess()) {
$this->setState(self::STATE_PROCESSING, true, '', $userNotification);
}
return $this;
}
은 귀하의 질문에 대답하려면, 당신은 당신이
STATE_PROCESSING
을 설정할 수 있습니다 자신의 방법으로
_checkState()
방법을 재정 의하여 뭘 하려는지 달성 할 수있다.
이지만 Magento가 알지도 예상하거나 처리 할 수없는 새로운 상태 컨텍스트가 생성 될 가능성이 높습니다.
변경 사항으로 인해 혼란이 야기되면 나를 비난하지 마십시오. 너는 경고 받았다. ^^