Magento – Get comment history of the order

You can use the below code to get the comment history of the order.

$orderId = 100000454 ;

$order = Mage::getModel(‘sales/order’)->loadByIncrementId($orderId);

$commentsObject = $order->getStatusHistoryCollection(true);

foreach ($commentsObject as $commentObj) {
echo $commentObj->getComment() .” created at”.$commentObj->getCreatedAt() ;
}

Revisions

No comments yet.

Leave a Reply