I want get the last event from fedex tracking from magento. i have call api for tracking and get the below response. now i want to get only last event from this responses

enter image description here

currently i am using following code but its return the

FATAL ERROR : getTrackings() is not a member function.

  public function getTrackingStatus(Varien_Event_Observer $observer)
        $collection = Mage::getResourceModel('udpo/po_grid_collection');
        $collection->addFieldToFilter( 'main_table.udropship_status', '3' );
        $collection->getSelect()->join( array('ship_item'=> sales_flat_shipment_grid), 'ship_item.udpo_id = main_table.entity_id', array('ship_item.entity_id'));
        $collection->getSelect()->join( array('track_item'=> sales_flat_shipment_track), 'track_item.parent_id = ship_item.entity_id', array('track_item.track_number','track_item.carrier_code'));
        $data = $collection->getData(); 
        $count = count($data);  
        if($count > 0){
            for($i=0; $i<$count; $i++){
                $response = Mage::getModel('usa/shipping_carrier_fedex')->getTracking($data[$i]['track_number']);
                echo "<pre>";
  • Try this print_r($response->getCollection()->getFirstItem()->getProgressdetail()->getActivity()); Let me know Mar 11, 2016 at 7:44
  • sorry dude not work. Fatal error: Call to undefined method Mage_Shipping_Model_Tracking_Result::getCollection()
    – Ajay Patel
    Mar 11, 2016 at 7:49

1 Answer 1


$response = Mage::getModel('usa/shipping_carrier_fedex')->getTracking(track_number); $trackData = $response->getAllTrackings(); $progressData = $trackData[0]->getData('progressdetail'); $deliveredStatus = $progressData[0]['activity'];

finally i got proper answer for this question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.