Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get shipping date of an order in magento? [closed]

I am using Magento community ver-1.5.1.0.

I want to get the shipping date of a order, How it is possible in magento?

like image 478
Sankar Subburaj Avatar asked May 04 '12 10:05

Sankar Subburaj


People also ask

How can I track my order in Magento 2?

The Magento 2 store admin can check the order status in the order view by navigating to Stores > Settings > Order Status grid.


1 Answers

Orders in Magento doesn't have a shipping date. They have shipments, and each one of them have a creation date.

You can access an order shipments using

$order->getShipmentsCollection();

Then on a shipment you can call getCreatedAt() to retreive creation date.

Thus, the full code will be

/** @var $order Mage_Sales_Model_Order */
foreach($order->getShipmentsCollection() as $shipment){
    /** @var $shipment Mage_Sales_Model_Order_Shipment */
    echo $shipment->getCreatedAt();
}
like image 82
JBreton Avatar answered Oct 22 '22 01:10

JBreton