isLoggedIn()){ Mage::getModel('rewardpoints/discount')->apply($item); } //else return null; //return $this->_discount->apply($observer->getEvent()->getItem()); } catch (Mage_Core_Exception $e) { Mage::getSingleton('checkout/session')->addError($e->getMessage()); } catch (Exception $e) { Mage::getSingleton('checkout/session')->addError($e); } return $this; } }