Exemple #1
0
 /**
  * Check if widget is visible
  *
  * @return boolean
  */
 protected function isVisible()
 {
     $result = parent::isVisible() && \XLite\Core\Config::getInstance()->CDev->Sale->sale_enabled && static::getWidgetTarget() != \XLite\Core\Request::getInstance()->target && 0 < $this->getData(new \XLite\Core\CommonCell(), true);
     if ($result) {
         if (!\XLite\Core\CMSConnector::isCMSStarted()) {
             if (self::WIDGET_TYPE_SIDEBAR == $this->getParam(self::PARAM_WIDGET_TYPE)) {
                 $result = in_array($this->viewListName, array('sidebar.first', 'sidebar.single'));
             } elseif (self::WIDGET_TYPE_CENTER == $this->getParam(self::PARAM_WIDGET_TYPE)) {
                 $result = 'center.bottom' == $this->viewListName;
             }
         }
     }
     return $result;
 }
Exemple #2
0
 /**
  * Check if widget is visible
  *
  * @return boolean
  */
 protected function isVisible()
 {
     return parent::isVisible() && static::getWidgetTarget() == \XLite\Core\Request::getInstance()->target;
 }