How to get Comments History of the order Pending->Processing->Awaiting Shipment->Shipped->Complete
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2019
02:10 AM
12-31-2019
02:10 AM
My code :
<?php require_once('app/Mage.php'); umask(0); Mage::app(); // try{ $orders = Mage::getModel('sales/order')->load('10'); foreach ($orders as $order) { $orderComments = $order->getAllStatusHistory(); print_r($orderComments); } // }catch(Exception $e){ // echo $e->getMessage(); // }
Solved! Go to Solution.
Labels:
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2019
10:51 PM
12-31-2019
10:51 PM
The screenshot is not accessible.
You may get order details in the sales\order\info.phtml file by using following code.
<?php $_order = $this->getOrder() ?>
After getting $_order you can the order increment id or real order id.
---
Problem Solved Click Accept as Solution!:Magento Community India Forum
Problem Solved Click Accept as Solution!:Magento Community India Forum
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2019
09:01 AM
12-31-2019
09:01 AM
Re: Magento 1.9 - How to get Order Comments History?
Hi @Aveeva
You may try following code
<?php require_once('app/Mage.php'); umask(0); Mage::app(); $orders = Mage::getModel('sales/order')->load('10'); $statusHistory = $order->getStatusHistoryCollection()->getData(); $details = array(); foreach($statusHistory as $status) { $details [] = $status['entity_name'].','.$status['status'].','.$status['comment']; } echo "<pre>"; print_r($details);
---
Problem Solved Click Accept as Solution!:Magento Community India Forum
Problem Solved Click Accept as Solution!:Magento Community India Forum
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2019
10:00 PM
12-31-2019
10:00 PM
Re: Magento 1.9 - How to get Order Comments History?
@Mukesh Tiwari If i use this script to my customer order account, how to load current order id,
screenshot : https://snipboard.io/EAGve0.jpg
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2019
10:51 PM
12-31-2019
10:51 PM
The screenshot is not accessible.
You may get order details in the sales\order\info.phtml file by using following code.
<?php $_order = $this->getOrder() ?>
After getting $_order you can the order increment id or real order id.
---
Problem Solved Click Accept as Solution!:Magento Community India Forum
Problem Solved Click Accept as Solution!:Magento Community India Forum