title: Filtering products by multiple categories in Magento
body: <p>I have some problem with filtering categories in Magento. The filter method which I used, display only one category, but I need to display few more. Here is my code:</p>
  
  <pre><code>$products = Mage::getModel('catalog/product')-&gt;getCollection();
  $products-&gt;joinField(
      'qty',
      'cataloginventory/stock_item',
      'qty',
      'product_id=entity_id',
      '{{table}}.stock_id=1',
      'left'
  );
  $products-&gt;addAttributeToFilter('qty', array('neq' =&gt; 0));
  $products-&gt;addAttributeToFilter('type_id','simple');
  $products-&gt;addAttributeToFilter('status', 1);
  $products-&gt;addAttributeToFilter('visibility', 4);
  $products-&gt;addAttributeToSelect('sku');
  $products-&gt;addAttributeToSelect('name');
  $products-&gt;addAttributeToSelect('description');
  $products-&gt;addAttributeToSelect('short_description');
  $products-&gt;addAttributeToSelect('url');
  $products-&gt;addAttributeToSelect('image');
  $products-&gt;addAttributeToFilter('price', array('gt' =&gt; 250));
  $products-&gt;addAttributeToSelect('special_price');
  $products-&gt;addAttributeToSelect('manufacturer');
  
  $products-&gt;addCategoryFilter(Mage::getModel('catalog/category')-&gt;load(array('32,5')),true);
  </code></pre>
  
  <p>The code display only products from <code>id=32</code>. The products from category <code>id=5</code> are not displayed.</p>
  
  <p>Thanks for any help.</p>
  
  <p>My Magento version is 1.6.2</p>