Mage_Adminhtml_Block_Sales_Order_Abstract Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Abstract:

Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Form Mage_Adminhtml_Block_Sales_Order_Creditmemo_View_Form Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Form Mage_Adminhtml_Block_Sales_Order_Invoice_View_Form Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Form Mage_Adminhtml_Block_Sales_Order_Shipment_View_Form Mage_Adminhtml_Block_Sales_Order_Totalbar Mage_Adminhtml_Block_Sales_Order_Totals Mage_Adminhtml_Block_Sales_Order_View_Info Mage_Adminhtml_Block_Sales_Order_View_Tab_Info

List of all members.

Public Member Functions

 getOrder ()
 getPriceDataObject ()
 displayPriceAttribute ($code, $strong=false, $separator= '< br/>')
 displayPrices ($basePrice, $price, $strong=false, $separator= '< br/>')
 getOrderTotalData ()
 getOrderInfoData ()
 displayShippingPriceInclTax ($order)


Detailed Description

Definition at line 34 of file Abstract.php.


Member Function Documentation

displayPriceAttribute ( code,
strong = false,
separator = '<br/>' 
)

Definition at line 64 of file Abstract.php.

00065     {
00066         return $this->displayPrices(
00067             $this->getPriceDataObject()->getData('base_'.$code),
00068             $this->getPriceDataObject()->getData($code),
00069             $strong,
00070             $separator
00071         );
00072     }

displayPrices ( basePrice,
price,
strong = false,
separator = '<br/>' 
)

Definition at line 74 of file Abstract.php.

00075     {
00076         if ($this->getOrder()->isCurrencyDifferent()) {
00077             $res = '<strong>';
00078             $res.= $this->getOrder()->formatBasePrice($basePrice);
00079             $res.= '</strong>'.$separator;
00080             $res.= '['.$this->getOrder()->formatPrice($price).']';
00081         }
00082         else {
00083             $res = $this->getOrder()->formatPrice($price);
00084             if ($strong) {
00085                 $res = '<strong>'.$res.'</strong>';
00086             }
00087         }
00088         return $res;
00089     }

displayShippingPriceInclTax ( order  ) 

Retrieve subtotal price include tax html formated content

Parameters:
Varien_Object $item
Returns:
string

Definition at line 118 of file Abstract.php.

00119     {
00120         $baseTax = $order->getBaseShippingTaxAmount();
00121         $tax = $order->getShippingTaxAmount();
00122 
00123         return $this->displayPrices(
00124             $order->getBaseShippingAmount()+$baseTax,
00125             $order->getShippingAmount()+$tax,
00126             false,
00127             ' '
00128         );
00129     }

getOrder (  ) 

Retrieve available order

Returns:
Mage_Sales_Model_Order

Reimplemented in Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Form, Mage_Adminhtml_Block_Sales_Order_Creditmemo_View_Form, Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Form, Mage_Adminhtml_Block_Sales_Order_Invoice_View_Form, Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Form, Mage_Adminhtml_Block_Sales_Order_Shipment_View_Form, Mage_Adminhtml_Block_Sales_Order_Totals, and Mage_Adminhtml_Block_Sales_Order_View_Tab_Info.

Definition at line 41 of file Abstract.php.

00042     {
00043         if ($this->hasOrder()) {
00044             return $this->getData('order');
00045         }
00046         if (Mage::registry('current_order')) {
00047             return Mage::registry('current_order');
00048         }
00049         if (Mage::registry('order')) {
00050             return Mage::registry('order');
00051         }
00052         Mage::throwException(Mage::helper('sales')->__('Can\'t get order instance'));
00053     }

getOrderInfoData (  ) 

Retrieve order info block settings

Returns:
array

Reimplemented in Mage_Adminhtml_Block_Sales_Order_View_Tab_Info.

Definition at line 106 of file Abstract.php.

00107     {
00108         return array();
00109     }

getOrderTotalData (  ) 

Retrieve order totals block settings

Returns:
array

Reimplemented in Mage_Adminhtml_Block_Sales_Order_Creditmemo_View_Form, and Mage_Adminhtml_Block_Sales_Order_View_Tab_Info.

Definition at line 96 of file Abstract.php.

00097     {
00098         return array();
00099     }

getPriceDataObject (  ) 

Definition at line 55 of file Abstract.php.

00056     {
00057         $obj = $this->getData('price_data_object');
00058         if (is_null($obj)) {
00059             return $this->getOrder();
00060         }
00061         return $obj;
00062     }


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

Generated on Sat Jul 4 17:22:58 2009 for Magento by  doxygen 1.5.8