public function getDatabaseConnection() { $resource = \Mage::getSingleton('core/resource'); return $resource->getConnection('write'); }