Mage_Adminhtml_Block_Sales_Order_View_Info Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_View_Info:

Mage_Adminhtml_Block_Sales_Order_Abstract Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getOrderStoreName ()
 getCustomerGroupName ()
 getCustomerViewUrl ()
 getViewUrl ($orderId)

Protected Member Functions

 _beforeToHtml ()


Detailed Description

Definition at line 34 of file Info.php.


Member Function Documentation

_beforeToHtml (  )  [protected]

Retrieve required options from parent

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 39 of file Info.php.

00040     {
00041         if (!$this->getParentBlock()) {
00042             Mage::throwException(Mage::helper('adminhtml')->__('Invalid parrent block for this block'));
00043         }
00044         $this->setOrder($this->getParentBlock()->getOrder());
00045 
00046         foreach ($this->getParentBlock()->getOrderInfoData() as $k => $v) {
00047             $this->setDataUsingMethod($k, $v);
00048         }
00049 
00050         parent::_beforeToHtml();
00051     }

getCustomerGroupName (  ) 

Definition at line 71 of file Info.php.

00072     {
00073         if ($this->getOrder()) {
00074             return Mage::getModel('customer/group')->load((int)$this->getOrder()->getCustomerGroupId())->getCode();
00075         }
00076         return null;
00077     }

getCustomerViewUrl (  ) 

Definition at line 79 of file Info.php.

00080     {
00081         if ($this->getOrder()->getCustomerIsGuest()) {
00082             return false;
00083         }
00084         return $this->getUrl('*/customer/edit', array('id' => $this->getOrder()->getCustomerId()));
00085     }

getOrderStoreName (  ) 

Definition at line 53 of file Info.php.

00054     {
00055         if ($this->getOrder()) {
00056             $storeId = $this->getOrder()->getStoreId();
00057             if (is_null($storeId)) {
00058                 return nl2br($this->getOrder()->getStoreName());
00059             }
00060             $store = Mage::app()->getStore($storeId);
00061             $name = array(
00062                 $store->getWebsite()->getName(),
00063                 $store->getGroup()->getName(),
00064                 $store->getName()
00065             );
00066             return implode('<br/>', $name);
00067         }
00068         return null;
00069     }

getViewUrl ( orderId  ) 

Definition at line 87 of file Info.php.

00088     {
00089         return $this->getUrl('*/sales_order/view', array('order_id'=>$orderId));
00090     }


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