Public Member Functions | |
fetchTotals (Mage_Sales_Model_Quote_Address $address) |
Definition at line 28 of file Discount.php.
fetchTotals | ( | Mage_Sales_Model_Quote_Address $ | address | ) |
Reimplemented from Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend.
Definition at line 31 of file Discount.php.
00032 { 00033 $amount = $address->getDiscountAmount(); 00034 if ($amount!=0) { 00035 $title = Mage::helper('sales')->__('Discount'); 00036 if ($address->getQuote()->getCouponCode()) { 00037 $title .= ' ('.$address->getQuote()->getCouponCode().')'; 00038 } 00039 $address->addTotal(array( 00040 'code'=>'discount', 00041 'title'=>$title, 00042 'value'=>-$amount 00043 )); 00044 } 00045 return $this; 00046 }