Public Member Functions | |
| setOrderId ($oid) | |
| getOrderId () | |
| setShipId ($oid) | |
| getShipId () | |
| setTrackId ($tid='') | |
| getTrackId () | |
| getTrackingInfo () | |
| getTrackingInfoByOrder () | |
| getTrackingInfoByShip () | |
| getTrackingInfoByTrackId () | |
| formatDeliveryDateTime ($date, $time) | |
| formatDeliveryDate ($date) | |
| formatDeliveryTime ($time, $date=null) | |
| getStoreSupportEmail () | |
| getContactUs () | |
Protected Member Functions | |
| _initOrder () | |
| _initShipment () | |
Protected Attributes | |
| $_track_id | |
| $_order_id | |
| $_ship_id | |
Definition at line 27 of file Popup.php.
| _initOrder | ( | ) | [protected] |
Initialize order model instance
Definition at line 69 of file Popup.php.
00070 { 00071 $order = Mage::getModel('sales/order')->load($this->_order_id); 00072 00073 if (!$order->getId()) { 00074 return false; 00075 } 00076 00077 return $order; 00078 }
| _initShipment | ( | ) | [protected] |
Initialize ship model instance
Definition at line 85 of file Popup.php.
00086 { 00087 $ship = Mage::getModel('sales/order_shipment')->load($this->_ship_id); 00088 00089 if (!$ship->getEntityId()) { 00090 return false; 00091 } 00092 00093 return $ship; 00094 }
| formatDeliveryDate | ( | $ | date | ) |
| formatDeliveryDateTime | ( | $ | date, | |
| $ | time | |||
| ) |
| formatDeliveryTime | ( | $ | time, | |
| $ | date = null | |||
| ) |
| getContactUs | ( | ) |
| getOrderId | ( | ) |
| getShipId | ( | ) |
| getStoreSupportEmail | ( | ) |
Definition at line 191 of file Popup.php.
00192 { 00193 return Mage::getStoreConfig('trans_email/ident_support/email'); 00194 }
| getTrackId | ( | ) |
| getTrackingInfo | ( | ) |
Definition at line 97 of file Popup.php.
00098 { 00099 $this->setOrderId($this->getRequest()->getParam('order_id')); 00100 $this->setTrackId($this->getRequest()->getParam('track_id')); 00101 $this->setShipId($this->getRequest()->getParam('ship_id')); 00102 00103 if ($this->getOrderId()>0) { 00104 return $this->getTrackingInfoByOrder(); 00105 } elseif($this->getShipId()>0) { 00106 return $this->getTrackingInfoByShip(); 00107 } else { 00108 return $this->getTrackingInfoByTrackId(); 00109 } 00110 }
| getTrackingInfoByOrder | ( | ) |
Definition at line 115 of file Popup.php.
00116 { 00117 $shipTrack = array(); 00118 if ($order = $this->_initOrder()) { 00119 $shipments = $order->getShipmentsCollection(); 00120 foreach ($shipments as $shipment){ 00121 $increment_id = $shipment->getIncrementId(); 00122 $tracks = $shipment->getTracksCollection(); 00123 00124 $trackingInfos=array(); 00125 foreach ($tracks as $track){ 00126 $trackingInfos[] = $track->getNumberDetail(); 00127 } 00128 $shipTrack[$increment_id] = $trackingInfos; 00129 } 00130 } 00131 return $shipTrack; 00132 }
| getTrackingInfoByShip | ( | ) |
Definition at line 137 of file Popup.php.
00138 { 00139 $shipTrack = array(); 00140 if ($shipment = $this->_initShipment()) { 00141 $increment_id = $shipment->getIncrementId(); 00142 $tracks = $shipment->getTracksCollection(); 00143 00144 $trackingInfos=array(); 00145 foreach ($tracks as $track){ 00146 $trackingInfos[] = $track->getNumberDetail(); 00147 } 00148 $shipTrack[$increment_id] = $trackingInfos; 00149 00150 } 00151 return $shipTrack; 00152 }
| getTrackingInfoByTrackId | ( | ) |
Definition at line 157 of file Popup.php.
00158 { 00159 $shipTrack[] = array(Mage::getModel('sales/order_shipment_track')->load($this->getTrackId()) 00160 ->getNumberDetail()); 00161 return $shipTrack; 00162 }
| setOrderId | ( | $ | oid | ) |
| setShipId | ( | $ | oid | ) |
| setTrackId | ( | $ | tid = '' |
) |
1.5.8