Public Member Functions | |
getTotals () | |
setTotals ($value) | |
renderTotal ($total, $area=null, $colspan=1) | |
renderTotals ($area=null, $colspan=1) | |
Protected Member Functions | |
_getTotalRenderer ($code) | |
Protected Attributes | |
$_totalRenderers | |
$_defaultRenderer = 'checkout/total_default' | |
$_totals = null |
Definition at line 27 of file Totals.php.
_getTotalRenderer | ( | $ | code | ) | [protected] |
Definition at line 48 of file Totals.php.
00049 { 00050 if (!isset($this->_totalRenderers[$code])) { 00051 $this->_totalRenderers[$code] = $this->_defaultRenderer; 00052 $config = Mage::getConfig()->getNode("global/sales/quote/totals/{$code}/renderer"); 00053 if ($config) 00054 $this->_totalRenderers[$code] = (string) $config; 00055 00056 $this->_totalRenderers[$code] = $this->getLayout()->createBlock($this->_totalRenderers[$code], "{$code}_total_renderer"); 00057 } 00058 00059 return $this->_totalRenderers[$code]; 00060 }
getTotals | ( | ) |
Reimplemented from Mage_Checkout_Block_Cart_Abstract.
Definition at line 34 of file Totals.php.
00035 { 00036 if (is_null($this->_totals)) { 00037 return parent::getTotals(); 00038 } 00039 return $this->_totals; 00040 }
renderTotal | ( | $ | total, | |
$ | area = null , |
|||
$ | colspan = 1 | |||
) |
Definition at line 62 of file Totals.php.
00063 { 00064 $code = $total->getCode(); 00065 if ($total->getAs()) { 00066 $code = $total->getAs(); 00067 } 00068 return $this->_getTotalRenderer($code) 00069 ->setTotal($total) 00070 ->setColspan($colspan) 00071 ->setRenderingArea(is_null($area) ? -1 : $area) 00072 ->toHtml(); 00073 }
renderTotals | ( | $ | area = null , |
|
$ | colspan = 1 | |||
) |
Definition at line 75 of file Totals.php.
00076 { 00077 $html = ''; 00078 00079 foreach($this->getTotals() as $total) { 00080 if ($total->getArea() != $area && $area != -1) { 00081 continue; 00082 } 00083 00084 $html .= $this->renderTotal($total, $area, $colspan); 00085 } 00086 00087 return $html; 00088 }
setTotals | ( | $ | value | ) |
$_defaultRenderer = 'checkout/total_default' [protected] |
Definition at line 30 of file Totals.php.
$_totalRenderers [protected] |
Definition at line 29 of file Totals.php.
$_totals = null [protected] |