public function tryRegister() { $this->request = Mage::app()->getRequest(); if ($this->request->isPost()) { $sn = $this->request->getPost('sn', null); if ($sn == null) { return false; } $sn = trim($sn); try { $response = Itoris_Installer_Client::registerCurrentStoreHost($this->getAlias(), $sn); if ($response == 0) { $this->getAdminhtmlSession()->addSuccess($this->__('The component has been registered!')); Mage::app()->cleanCache(); } else { $this->getAdminhtmlSession()->addError($this->__('Invalid serial number!')); } } catch (Exception $e) { $this->getAdminhtmlSession()->addError($e->getMessage()); } } }
public function registerCurrentStoreHost($sn) { return Itoris_Installer_Client::registerCurrentStoreHost($this->getAlias(), $sn); }