Mage_Adminhtml_Block_Sales_Order_Shipment_View_Tracking Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Shipment_View_Tracking:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getShipment ()
 getSubmitUrl ()
 getSaveButtonHtml ()
 getRemoveUrl ($track)
 getTrackInfoUrl ($track)
 getCarriers ()
 getCarrierTitle ($code)

Protected Member Functions

 _prepareLayout ()


Detailed Description

Definition at line 34 of file Tracking.php.


Member Function Documentation

_prepareLayout (  )  [protected]

Prepares layout of block

Returns:
Mage_Adminhtml_Block_Sales_Order_View_Giftmessage

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

Returns:
unknown

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

Returns:
string

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

Returns:
string

Definition at line 80 of file Tracking.php.

00081     {
00082         return $this->getChildHtml('save_button');
00083     }

getShipment (  ) 

Retrieve shipment model instance

Returns:
Mage_Sales_Model_Order_Shipment

Definition at line 60 of file Tracking.php.

00061     {
00062         return Mage::registry('current_shipment');
00063     }

getSubmitUrl (  ) 

Retrieve save url

Returns:
string

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

Returns:
string

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     }


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

Generated on Sat Jul 4 17:23:01 2009 for Magento by  doxygen 1.5.8