private function getLoginUrl(Qualityunit_Liveagent_Helper_Settings $settings) { $authToken = $settings->getOwnerAuthToken(); if ($authToken == '') { $sessionId = $settingsgetOwnerSessionId(); if ($sessionId != '') { return $settings->getLiveAgentUrl() . '/agent?S=' . $settings->getOwnerSessionId(); } return $settings->getLiveAgentUrl() . '/agent'; } return $settings->getLiveAgentUrl() . '/agent?AuthToken=' . $authToken; }
private function renderAccountDialog() { if ($this->isSetStatus() && Qualityunit_Liveagent_Helper_Account::isOnline()) { $this->checkButtonCodeIsEmpty(); $block = new Qualityunit_Liveagent_Block_Buttoncode(); } if ($this->isSetStatus() && !Qualityunit_Liveagent_Helper_Account::isOnline()) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Unable to connect LiveAgent at') . ' ' . $this->settings->getLiveAgentUrl()); $block = new Qualityunit_Liveagent_Block_Account(); } if (!$this->isSetStatus()) { $block = new Qualityunit_Liveagent_Block_Account(); } $this->_addContent($this->getLayout()->createBlock($block)); }