On my category page I am trying to show all it's products, even though they are all disabled.
On the category page I am using:
$categoryModel = Mage::getModel('catalog/category');
$_category = $this->getCurrentCategory();
$_category_id = $_category->getId();
$products = $categoryModel->load($_category_id)
->getProductCollection()
->addAttributeToSelect(array('id', 'name','etc...'))
->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_DISABLED);
But my collection is always empty.
I have also tried using:
->addAttributeToFilter('status', 2)
Without success. If i switch the filter to enabled products with either:
->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
->addAttributeToFilter('status', 1)
Then (in any other category where products are enabled) then the collection shows all products.
I have flat catalog turned off/set to No in my configuration.