title: Magento List all out of stock items
body: <p>I am trying to make a cms page which lists all out of stock items. </p>
  
  <pre><code>protected function _getProductCollection()
     {
  
          $collection = Mage::getModel('catalog/product')-&gt;getCollection();
          $collection = $this-&gt;_addProductAttributesAndPrices($collection)
           -&gt;addStoreFilter()
           -&gt;addAttributeToSort('entity_id', 'desc') //&lt;b&gt;THIS WILL SHOW THE LATEST PRODUCTS FIRST&lt;/b&gt;
           -&gt;addAttributeToFilter('stock_status', 0)
  
  
           -&gt;setPageSize($this-&gt;get_prod_count())
           -&gt;setCurPage($this-&gt;get_cur_page());
          $this-&gt;setProductCollection($collection);
          return $collection;
     }
  </code></pre>
  
  <p>But it is not working. It lists all items. What is the method to list all items which are qty =0 or is_in_stock =0?</p>