Beispiel #1
0
 /**
  * Check if widget is visible
  *
  * @return boolean
  */
 protected function isVisible()
 {
     $result = parent::isVisible();
     if ($result) {
         $cnd = new \XLite\Core\CommonCell();
         $cnd->{\XLite\Module\XC\News\Model\Repo\NewsMessage::SEARCH_ENABLED} = true;
         $count = \XLite\Core\Database::getRepo('XLite\\Module\\XC\\News\\Model\\NewsMessage')->search($cnd, true);
         $result = $count > 0;
     }
     return $result;
 }
Beispiel #2
0
 /**
  * Check if widget is visible
  *
  * @return boolean
  */
 protected function isVisible()
 {
     return parent::isVisible() && $this->getProduct()->isAvailable();
 }
Beispiel #3
0
 /**
  * Check if widget is visible
  *
  * @return boolean
  */
 protected function isVisible()
 {
     return parent::isVisible() && !$this->isCheckoutLayout();
 }
Beispiel #4
0
 /**
  * Check if widget is visible
  *
  * @return boolean
  */
 protected function isVisible()
 {
     $result = parent::isVisible() && $this->getCategory() && 1 < $this->getCategory()->getProductsCount();
     if ($result) {
         $config = \XLite\Core\Config::getInstance()->XC->ProductFilter;
         $result = $config->enable_in_stock_only_filter || $config->enable_price_range_filter;
         if (!$result && $config->enable_attributes_filter) {
             $filterAttributes = new \XLite\Module\XC\ProductFilter\View\Filter\Attributes();
             $result = $filterAttributes->isVisible();
         }
     }
     return $result;
 }