public function preDispatch() { parent::preDispatch(); if ($this->getRequest()->isGet() && !$this->getRequest()->isPost() && !$this->getRequest()->isXmlHttpRequest()) { // check rewrite menu if (count($this->getCustomViewComponentHelper()->getActiveComponents()) < 1) { throw new Exception('At least 1 channel of current view should be enabled.'); } // update client data try { Mage::helper('M2ePro/Client')->updateBackupConnectionData(false); } catch (Exception $exception) { } // run servicing code try { Mage::getModel('M2ePro/Servicing_Dispatcher')->process(Ess_M2ePro_Model_Servicing_Dispatcher::DEFAULT_INTERVAL); } catch (Exception $exception) { } } if (Mage::helper('M2ePro/Module_Maintenance')->isEnabled()) { if (Mage::helper('M2ePro/Module_Maintenance')->isOwner()) { Mage::helper('M2ePro/Module_Maintenance')->prolongRestoreDate(); } elseif (Mage::helper('M2ePro/Module_Maintenance')->isExpired()) { Mage::helper('M2ePro/Module_Maintenance')->disable(); } } return $this; }
public function preDispatch() { parent::preDispatch(); if ($this->getRequest()->isXmlHttpRequest() && !Mage::getSingleton('admin/session')->isLoggedIn()) { exit(json_encode(array('ajaxExpired' => 1, 'ajaxRedirect' => $this->_getRefererUrl()))); } if ($this->getRequest()->isGet() && !$this->getRequest()->isPost() && !$this->getRequest()->isXmlHttpRequest() && Mage::helper('M2ePro/Wizard')->isInstallationFinished()) { try { Mage::getModel('M2ePro/Servicing_Dispatcher')->process(Ess_M2ePro_Model_Servicing_Dispatcher::DEFAULT_INTERVAL); } catch (Exception $exception) { } } return $this; }
public function preDispatch() { parent::preDispatch(); if ($this->getRequest()->isXmlHttpRequest() && !Mage::getSingleton('admin/session')->isLoggedIn()) { exit(json_encode(array('error' => true, 'message' => Mage::helper('M2ePro')->__('You have logged out. Refresh page please.')))); } if ($this->getRequest()->isGet() && !$this->getRequest()->isPost() && !$this->getRequest()->isXmlHttpRequest() && Mage::getModel('M2ePro/Wizard')->isFinished()) { try { Mage::getModel('M2ePro/License_Server')->updateStatus(false); Mage::getModel('M2ePro/License_Server')->updateLock(false); Mage::getModel('M2ePro/License_Server')->updateMessages(false); } catch (Exception $exception) { } } return $this; }
public function preDispatch() { parent::preDispatch(); Mage::getSingleton('M2ePro/Order_Log_Manager')->setInitiator(Ess_M2ePro_Helper_Data::INITIATOR_USER); }