I have been working on a custom module for Magento (ver. 1.8.0.0) that shows a list of related products of a certain product.
In order to achieve this I have created
I just managed to achieve what I wanted. I have overwritten both the Mage_Catalog_Model_Layer
class and the Mage_Catalog_Model_Category
Both now have a new variable called $_customCollection: protected $_customProductCollection;
I have overwritten the getProductCollection() in both classes and I added this in the beginning of the method:
if(isset($this->_customProductCollection)){
return $this->_customProductCollection;
}
I have also a method that allows me to set this "customProductCollection" inside both these classes. Once It's set, the rest of the data of the layered navigation/category is based on this collection.
;)