Example #1
0
 /**
  * Check availability display layer block
  *
  * @return bool
  */
 public function canShowBlock()
 {
     $availableResCount = (int) Mage::app()->getStore()->getConfig(Mage_CatalogSearch_Model_Layer::XML_PATH_DISPLAY_LAYER_COUNT);
     if (!$availableResCount || $availableResCount >= $this->getLayer()->getProductCollection()->getSize()) {
         return parent::canShowBlock();
     }
     return false;
 }
 /**
  * Check availability display layer block
  *
  * @return bool
  */
 public function canShowBlock()
 {
     $helper = Mage::helper('elasticsearch');
     if ($helper->isThirdPartSearchEngine() && $helper->isActiveEngine()) {
         return $this->canShowOptions() || count($this->getLayer()->getState()->getFilters());
     }
     return parent::canShowBlock();
 }
Example #3
0
 /**
  * Check availability display layer block
  *
  * @return bool
  */
 public function canShowBlock()
 {
     $_isLNAllowedByEngine = Mage::helper('catalogsearch')->getEngine()->isLeyeredNavigationAllowed();
     if (!$_isLNAllowedByEngine) {
         return false;
     }
     $availableResCount = (int) Mage::app()->getStore()->getConfig(Mage_CatalogSearch_Model_Layer::XML_PATH_DISPLAY_LAYER_COUNT);
     if (!$availableResCount || $availableResCount >= $this->getLayer()->getProductCollection()->getSize()) {
         return parent::canShowBlock();
     }
     return false;
 }
 /**
  * Indicates if the block should be shown or not.
  * Append forced category loading to make the system more resistant to layout changes
  *
  * @return bool
  */
 public function canShowBlock()
 {
     if (!$this->getLayer()->getProductCollection()->isLoaded()) {
         $this->getLayer()->getProductCollection()->getSize();
     }
     return parent::canShowBlock();
 }