protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $curStore = $this->getRequest()->getParam('store');
     $this->storeCode = isset($curStore) ? $curStore : '0';
     $this->config = new Clearcode_Addshoppers_Helper_Config($this->storeCode);
     $html = $this->getCssSectionHtml();
     $html .= $this->getHeaderSectionHtml();
     $html .= $this->getPluginStatusSectionHtml();
     if ($this->config->getEnabled() == 1) {
         if ($this->config->getActive() != 1) {
             $html .= $this->getLoginSectionHtml();
             $html .= $this->getNewAccSectionHtml();
         } else {
             $html .= $this->getAccSettingsSectionHtml();
             $html .= $this->getDefaultAppsSectionHtml();
             $html .= $this->getPurchaseSharingSectionHtml();
             $html .= $this->getLogoutSectionHtml();
         }
     }
     $html .= $this->getFollowSectionHtml();
     $html .= $this->getAboutSectionHtml();
     $html .= $this->getJavaScriptsHtml();
     return $html;
 }
Example #2
0
 public function enableAction()
 {
     $params = $this->getRequest()->getParams();
     $config = new Clearcode_Addshoppers_Helper_Config($params['store']);
     $config->setEnabled($params['status']['enabled']);
     Mage::app()->getCache()->clean();
     $this->redirectBack($params['store']);
 }
Example #3
0
 /**
  * Returns shop ID
  * 
  * @return string AddShoppers Shop ID
  */
 public function getShopId()
 {
     return $this->config->getShopId();
 }