Public Member Functions | |
ajaxAction () | |
popupAction () | |
Protected Member Functions | |
_initOrder () |
Definition at line 35 of file TrackingController.php.
_initOrder | ( | ) | [protected] |
Initialize order model instance
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 }