title: adding products compare to magento using products attributes (category)
body: <p>Hy ,, Im trying to make Magento compare products by grouping all products with the same cateogry and compare them together ,and group the other and compare them together..etc instead of comparing all them togher, I have tried this code </p>
  
  <pre><code>      collection.php
  
        class Mage_Catalog_Model_Resource_Product_Collection extends   Mage_Catalog_Model_Resource_Collection_Abstract
  
        public function addCategoryFilterH($request)
        {
  
          $this-&gt;_productLimitationFilters['category_id'] =$request;
          unset($this-&gt;_productLimitationFilters['category_is_anchor']);
  
  
          $this-&gt;_applyZeroStoreProductLimitations();
  
          $this-&gt;_applyProductLimitations();
  
              return $this;
  
  
  }
  </code></pre>
  
  <p>then i do in products compare this :</p>
  
  <pre><code>          list.phtml
            $this_original=$this;
            $cat15=$this-&gt;getItems()-&gt;addCategoryFilterH(15);
             ...for loop throw this products ....
            $this=$this_original;
            $cat8=$this-&gt;getItems()-&gt;addCategoryFilterH(8);
            ...for loop throw this products ....
            ...next category id ... 
            ...for loop ... etc 
  </code></pre>
  
  <p>but my code did not work , any Help?</p>