Example #1
0
 public function isAdminRegistered()
 {
     try {
         return Itoris_Installer_Client::isAdminRegistered($this->getAlias());
     } catch (Exception $e) {
         $this->getAdminhtmlSession()->addError($e->getMessage());
         return false;
     }
 }
Example #2
0
 public function preDispatch()
 {
     $result = parent::preDispatch();
     $helper = $this->getDataHelper();
     if (!Itoris_Installer_Client::isAdminRegistered($helper->getAlias())) {
         $this->setFlag('', self::FLAG_NO_DISPATCH, true);
         $register = $this->getLayout()->createBlock('itoris_viewmoreproducts/admin_register');
         $register->setMessage($helper->__('Your copy of the component is not registered! All functions are disabled. Please register. Enter your S/N to register:'));
         Mage::getSingleton('adminhtml/session')->addError($register->toHtml());
         $this->loadLayout();
         $this->getLayout()->getBlock('left')->unsetChildren();
         $this->getLayout()->getBlock('content')->unsetChildren();
         $this->renderLayout();
     }
     return $result;
 }