2015-06-09 46 views
0

Magento中添加一個新的批處理動作,在此我改變訂單的 狀態務實客戶爲編程通知Magento的

。它的所有工作正常

但問題是改變了狀態後,發送電子郵件到 客戶也沒有顯示客戶通知評論歷史

。以下是密碼

   $order->setIsCustomerNotified(false); 
       $order->setStatus("ready_for_pickup"); 
       $order->addStatusHistoryComment($comment, false); 
       $order->save(); 
       $order->sendOrderUpdateEmail($notify = true, $comment); 

你能告訴我我該如何解決這個問題。

感謝

回答

1

確定我已經得到了解決,並通過下面的代碼和平現在是工作的罰款。

   $order->setIsCustomerNotified(false); 
       $order->setStatus("your_order_status"); 

       $historyItem = $order->addStatusHistoryComment($comment, "your_order_status"); 
       $historyItem->setIsCustomerNotified(1)->save(); 
       $order->save(); 
       $order->sendOrderUpdateEmail($notify = true, $comment); 

感謝