Example #1
0
 public function getItemsCount()
 {
     $cnt = parent::getItemsCount();
     if ($this->calculateRanges()) {
         $hide = Mage::getStoreConfig('amshopby/general/hide_one_value') && $cnt == 1;
     } else {
         $min = $this->getMinValue();
         $max = $this->getMaxValue();
         $hide = $min == $max;
     }
     return $hide ? 0 : $cnt;
 }
Example #2
0
 public function getItemsCount()
 {
     $min = $this->getMinValue();
     $max = $this->getMaxValue();
     $noneVariant = is_null($min) || is_null($max);
     $oneHiddenVariant = $min == $max && Mage::getStoreConfig('amshopby/general/hide_one_value');
     if ($noneVariant || $oneHiddenVariant) {
         $count = 0;
     } else {
         $count = parent::getItemsCount();
     }
     return $count;
 }