How to stop order processing of same order once if order status is canceled in Magento?

前端 未结 1 2050
小鲜肉
小鲜肉 2021-02-11 04:11

How to stop processing of the same order once the order is cancelled ? I\'m using paypal payment method,While placing the order from paypal if I cancel the order from the paypal

相关标签:
1条回答
  • 2021-02-11 04:59

    i think problem with you status is change but the state is not changing try below code..

                  $order->setData('state', Mage_Sales_Model_Order::STATE_CANCELED); 
                  $order->setStatus("canceled");
                  $history = $order->addStatusHistoryComment('', false);
                  $history->setIsCustomerNotified(false);
                  $order->save(); 
    
    0 讨论(0)
提交回复
热议问题