Public Member Functions | |
getShipment () | |
getSubmitUrl () | |
getSaveButtonHtml () | |
getRemoveUrl ($track) | |
getTrackInfoUrl ($track) | |
getCarriers () | |
getCarrierTitle ($code) | |
Protected Member Functions | |
_prepareLayout () |
Definition at line 34 of file Tracking.php.
_prepareLayout | ( | ) | [protected] |
Prepares layout of block
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 41 of file Tracking.php.
00042 { 00043 $onclick = "submitAndReloadArea($('shipment_tracking_info').parentNode, '".$this->getSubmitUrl()."')"; 00044 $this->setChild('save_button', 00045 $this->getLayout()->createBlock('adminhtml/widget_button') 00046 ->setData(array( 00047 'label' => Mage::helper('sales')->__('Add'), 00048 'class' => 'save', 00049 'onclick' => $onclick 00050 )) 00051 00052 ); 00053 }
getCarriers | ( | ) |
Retrieve
Definition at line 116 of file Tracking.php.
00117 { 00118 $carriers = array(); 00119 $carrierInstances = Mage::getSingleton('shipping/config')->getAllCarriers( 00120 $this->getShipment()->getStoreId() 00121 ); 00122 $carriers['custom'] = Mage::helper('sales')->__('Custom Value'); 00123 foreach ($carrierInstances as $code => $carrier) { 00124 if ($carrier->isTrackingAvailable()) { 00125 $carriers[$code] = $carrier->getConfigData('title'); 00126 } 00127 } 00128 return $carriers; 00129 }
getCarrierTitle | ( | $ | code | ) |
Definition at line 131 of file Tracking.php.
00132 { 00133 if ($carrier = Mage::getSingleton('shipping/config')->getCarrierInstance($code)) { 00134 return $carrier->getConfigData('title'); 00135 } 00136 else { 00137 return Mage::helper('sales')->__('Custom Value'); 00138 } 00139 return false; 00140 }
getRemoveUrl | ( | $ | track | ) |
Retrieve remove url
Definition at line 90 of file Tracking.php.
00091 { 00092 return $this->getUrl('*/*/removeTrack/', array( 00093 'shipment_id' => $this->getShipment()->getId(), 00094 'track_id' => $track->getId() 00095 )); 00096 }
getSaveButtonHtml | ( | ) |
Retrive save button html
Definition at line 80 of file Tracking.php.
00081 { 00082 return $this->getChildHtml('save_button'); 00083 }
getShipment | ( | ) |
Retrieve shipment model instance
Definition at line 60 of file Tracking.php.
00061 { 00062 return Mage::registry('current_shipment'); 00063 }
getSubmitUrl | ( | ) |
Retrieve save url
Definition at line 70 of file Tracking.php.
00071 { 00072 return $this->getUrl('*/*/addTrack/', array('shipment_id'=>$this->getShipment()->getId())); 00073 }
getTrackInfoUrl | ( | $ | track | ) |
Retrieve remove url
Definition at line 103 of file Tracking.php.
00104 { 00105 return $this->getUrl('*/*/viewTrack/', array( 00106 'shipment_id' => $this->getShipment()->getId(), 00107 'track_id' => $track->getId() 00108 )); 00109 }