/** * Retrieve loaded category collection * * @return Mage_CatalogSearch_Model_Resource_Fulltext_Collection */ protected function _getProductCollection() { if (is_null($this->_productCollection)) { $this->_productCollection = $this->getListBlock()->getLoadedProductCollection(); } $this->_productCollection->addAttributeToFilter('attribute_set_id', 25); $this->_productCollection->addAttributeToFilter('type_id', 'ofertefurnizori'); //Zend_Debug::dump($this->_productCollection->getData()); return $this->_productCollection; }
/** * Retrieve loaded category collection * * @return Mage_CatalogSearch_Model_Resource_Fulltext_Collection */ protected function _getProductCollection() { if (is_null($this->_productCollection)) { $this->_productCollection = $this->getListBlock()->getLoadedProductCollection(); $userid = Mage::getSingleton('customer/session')->getId(); $user_id = $userid ? $userid : 0; $this->_productCollection1 = $this->_productCollection->addAttributeToFilter('customer_id', $user_id); } return $this->_productCollection1; }