/** * Get balance instance * * @return Enterprise_CustomerBalance_Model_Balance */ protected function _getBalanceModel() { if (is_null($this->_balanceModel)) { $this->_balanceModel = Mage::getModel('enterprise_customerbalance/balance')->setCustomer($this->_getCustomer())->setWebsiteId(Mage::app()->getStore()->getWebsiteId()); //load customer balance for customer in case we have //registered customer and this is not guest checkout if ($this->_getCustomer()->getId()) { $this->_balanceModel->loadByCustomer(); } } return $this->_balanceModel; }