*/ class Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Custbalance extends Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend { /** * Fetch customer balance * * @param Mage_Sales_Model_Quote_Address $address * @return Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Custbalance */ public function fetchTotals(Mage_Sales_Model_Quote_Address $address) { $custbalance = $address->getCustbalanceAmount(); if ($custbalance != 0) { $address->addTotal(array( 'code' => 'custbalance', 'title' => Mage::helper('sales')->__('Store Credit'), 'value' => -$custbalance )); } return $this; } }