Mage_Shipping_TrackingController Class Reference

Inheritance diagram for Mage_Shipping_TrackingController:

Mage_Core_Controller_Front_Action Mage_Core_Controller_Varien_Action

List of all members.

Public Member Functions

 ajaxAction ()
 popupAction ()

Protected Member Functions

 _initOrder ()


Detailed Description

Definition at line 35 of file TrackingController.php.


Member Function Documentation

_initOrder (  )  [protected]

Initialize order model instance

Returns:
Mage_Sales_Model_Order || false

Definition at line 71 of file TrackingController.php.

00072     {
00073         $id = $this->getRequest()->getParam('order_id');
00074 
00075         $order = Mage::getModel('sales/order')->load($id);
00076         $customerId = Mage::getSingleton('customer/session')->getCustomerId();
00077 
00078         if (!$order->getId() || !$customerId || $order->getCustomerId() != $customerId) {
00079             return false;
00080         }
00081         return $order;
00082     }

ajaxAction (  ) 

Definition at line 37 of file TrackingController.php.

00038     {
00039         if ($order = $this->_initOrder()) {
00040             $response = '';
00041             $tracks = $order->getTracksCollection();
00042 
00043             $className = Mage::getConfig()->getBlockClassName('core/template');
00044             $block = new $className();
00045             $block->setType('core/template')
00046                 ->setIsAnonymous(true)
00047                 ->setTemplate('sales/order/trackinginfo.phtml');
00048 
00049             foreach ($tracks as $track){
00050                 $trackingInfo = $track->getNumberDetail();
00051                 $block->setTrackingInfo($trackingInfo);
00052                 $response .= $block->toHtml()."\n<br />";
00053             }
00054 
00055             $this->getResponse()->setBody($response);
00056         }
00057     }

popupAction (  ) 

Definition at line 59 of file TrackingController.php.

00060     {
00061         $this->loadLayout();
00062         $this->renderLayout();
00063     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:52 2009 for Magento by  doxygen 1.5.8