Public Member Functions | |
__construct () | |
getTotals () | |
getHeaderText () | |
getHeaderCssClass () | |
renderTotal ($total, $area=null, $colspan=1) | |
renderTotals ($area=null, $colspan=1) | |
canSendNewOrderConfirmationEmail () | |
Protected Member Functions | |
_getTotalRenderer ($code) | |
Protected Attributes | |
$_totalRenderers | |
$_defaultRenderer = 'adminhtml/sales_order_create_totals_default' |
Definition at line 35 of file Totals.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Varien_Object.
Definition at line 40 of file Totals.php.
00041 { 00042 parent::__construct(); 00043 $this->setId('sales_order_create_totals'); 00044 }
_getTotalRenderer | ( | $ | code | ) | [protected] |
Definition at line 61 of file Totals.php.
00062 { 00063 if (!isset($this->_totalRenderers[$code])) { 00064 $this->_totalRenderers[$code] = $this->_defaultRenderer; 00065 $config = Mage::getConfig()->getNode("global/sales/quote/totals/{$code}/admin_renderer"); 00066 if ($config) 00067 $this->_totalRenderers[$code] = (string) $config; 00068 00069 $this->_totalRenderers[$code] = $this->getLayout()->createBlock($this->_totalRenderers[$code], "{$code}_total_renderer"); 00070 } 00071 00072 return $this->_totalRenderers[$code]; 00073 }
canSendNewOrderConfirmationEmail | ( | ) |
Definition at line 94 of file Totals.php.
00095 { 00096 return Mage::helper('sales')->canSendNewOrderConfirmationEmail($this->getQuote()->getStoreId()); 00097 }
getHeaderCssClass | ( | ) |
getHeaderText | ( | ) |
Definition at line 51 of file Totals.php.
00052 { 00053 return Mage::helper('sales')->__('Order Totals'); 00054 }
getTotals | ( | ) |
Definition at line 46 of file Totals.php.
00047 { 00048 return $this->getQuote()->getTotals(); 00049 }
renderTotal | ( | $ | total, | |
$ | area = null , |
|||
$ | colspan = 1 | |||
) |
Definition at line 75 of file Totals.php.
00076 { 00077 return $this->_getTotalRenderer($total->getCode()) 00078 ->setTotal($total) 00079 ->setColspan($colspan) 00080 ->setRenderingArea(is_null($area) ? -1 : $area) 00081 ->toHtml(); 00082 }
renderTotals | ( | $ | area = null , |
|
$ | colspan = 1 | |||
) |
Definition at line 84 of file Totals.php.
00085 { 00086 $html = ''; 00087 foreach($this->getTotals() as $total) { 00088 $html .= $this->renderTotal($total, $area, $colspan); 00089 } 00090 00091 return $html; 00092 }
$_defaultRenderer = 'adminhtml/sales_order_create_totals_default' [protected] |
Definition at line 38 of file Totals.php.
$_totalRenderers [protected] |
Definition at line 37 of file Totals.php.