public function indexAction()
 {
     $timer = microtime(true);
     try {
         Unirgy_Dropship_Helper_Protected::validateLicense('Unirgy_Dropship');
     } catch (Exception $e) {
         //print_r($e);
         Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
     }
     //echo microtime(true)-$timer; exit;
     $this->loadLayout();
     $hlp = Mage::helper('udropship');
     $this->_setActiveMenu('sales/udropship');
     $this->_addBreadcrumb($hlp->__('Vendors'), $hlp->__('Vendors'));
     $this->_addContent($this->getLayout()->createBlock('udropship/adminhtml_vendor'));
     $this->renderLayout();
 }
Exemple #2
0
 public function isActive($store = null)
 {
     $storeId = Mage::app()->getStore($store)->getId();
     if (isset($this->_isActive[$storeId])) {
         return $this->_isActive[$storeId];
     }
     if (!extension_loaded('ionCube Loader')) {
         return $this->_isActive[$storeId] = false;
     }
     if ($this->isModuleActive('Unirgy_SimpleLicense')) {
         try {
             Unirgy_Dropship_Helper_Protected::validateLicense('Unirgy_Dropship');
         } catch (Unirgy_SimpleLicense_Exception $e) {
             return $this->_isActive[$storeId] = false;
         }
     } else {
         if (!Mage::helper('udropship/protected')->validateLicense('Unirgy_Dropship')) {
             return $this->_isActive[$storeId] = false;
         }
     }
     $udropship = Mage::getStoreConfigFlag('carriers/udropship/active', $store);
     $udsplit = Mage::getStoreConfigFlag('carriers/udsplit/active', $store);
     return $this->_isActive[$storeId] = $udropship || $udsplit;
 }
 public function udropship_admin_validate($observer)
 {
     try {
         Unirgy_Dropship_Helper_Protected::validateLicense($observer->getModule());
     } catch (Exception $e) {
         Mage::getSingleton('udropship/session')->addError($e->getMessage());
     }
 }