is there any way to show disabled products in category rss feed also?
Magento 1.6.1.0
[EDIT] After some investigations I found out that is not possible. Not in a decent period of time at least.
The table catalog_category_product_index is joined with the product collection in order to get the products associated to that category. And in that index table the disabled products do not appear.
So in order to get your disabled products also you will need to rewrite the whole _toHtml method in the Mage_Rss_Block_Catalog_Category block and avoid using addCategoryFilter.
[Original Post]
I don't know why would you need that. If you show disabled products in RSS then the link in the feed will point to a 404 page.
But anyway...here is how you can do it.
You need to rewrite the Mage_Rss_Block_Catalog_Category::_toHtml method.
Here is what you need to change.
$productCollection = Mage::getModel('catalog/product')->getCollection(); needs to become
$productCollection = Mage::getResourceModel('catalog/product_collection'); because if you have the flat catalog enabled, the disabled products are not indexed in the flat tables so you won't be able to access them. This way you use directly the EAV tables.
Then you need to replace
$layer->prepareProductCollection($productCollection); with
$productCollection ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes()) //add some attributes to select ->addMinimalPrice() //add all kind of prices to select ->addFinalPrice() ->addTaxPercents() ->addUrlRewrite($currentCategory->getId()); Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection); //filter only visible products. This is needed because the prepareProductCollection method filters out the disabled products. The code I suggested is basically the same thing as in prepareProductCollection but I removed the status filter.