cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 1.9 - How to add status, created_at, entity_name filter ?

Highlighted

Magento 1.9 - How to add status, created_at, entity_name filter ?

My output :

 

Array
(
    [0] => Array
        (
            [entity_id] => 12
            [parent_id] => 10
            [is_customer_notified] => 0
            [is_visible_on_front] => 0
            [comment] => 
            [status] => complete
            [created_at] => 2019-12-11 11:12:14
            [entity_name] => shipment
        )

    [1] => Array
        (
            [entity_id] => 11
            [parent_id] => 10
            [is_customer_notified] => 0
            [is_visible_on_front] => 0
            [comment] => 
            [status] => processing
            [created_at] => 2019-12-11 11:11:14
            [entity_name] => invoice
        )

    [2] => Array
        (
            [entity_id] => 10
            [parent_id] => 10
            [is_customer_notified] => 1
            [is_visible_on_front] => 0
            [comment] => 
            [status] => pending
            [created_at] => 2019-12-11 11:10:50
            [entity_name] => order
        )

)

code :

 

<?php 
    require_once('app/Mage.php');
    umask(0);
    Mage::app();

    $order = Mage::getModel('sales/order')->load(10);

    $statusHistory = $order->getStatusHistoryCollection()->getData();

    echo "<pre>";
    print_r($statusHistory);
?>

How to add filter for  status, created_at, entity_name filter ?