title: Change Magento's default search results by passing result ids
body: <p>I've customized the <em>catalog advanced search</em> page which now has a special visual search engine, that finds the desired products and <strong>returns their ids</strong> (via ajax). Given these ids I want to create a list of search results based on Magento's default search results page layout. Any ideas how to do that?</p>
  
  <p><strong>UPDATE</strong>
  Can't get it work for a while now, so I'll paste what I'm trying, maybe some of you can help.</p>
  
  <pre><code>   public function getIdsFromSearchUrl($value){
        $c = explode(',',$value);
        if(count($c) &gt; 1){ return $c; } else { return $value; }
     }
  
     // THE FOLLOWING FUNCTION'S ORIGINAL VERSION IS COMMENTED OUT UP ABOVE
  
      public function getSearchCriterias()
      {
          $search = $this-&gt;_searchCriterias;
          /* display id filtering criteria */
  
          var_dump($search);
  
          $search = array();
  
          if(isset($_GET['productid'])) {
              $value = $this-&gt;getIdsFromSearchUrl($_GET['productid']);
              if(is_array($value)){
                foreach($value as $v){
                  if(is_numeric($v)){
                    $product = Mage::getModel('catalog/product')-&gt;load($v);
                    var_dump($product-&gt;getId());
                    $search[] = array('name'=&gt;'Name','value'=&gt;$product-&gt;getName());
                  }
                }
              } else {
                if(is_numeric($value)){
                 $product = Mage::getModel('catalog/product')-&gt;load($value);
                 $search[] = array('name'=&gt;'Name','value'=&gt;$product-&gt;getName());
                }
              }
          }
  
          var_dump($search);
  
          $this-&gt;_searchCriterias = $search;
  
          return $search;
      }
                  Mage::getSingleton('catalog/product_visibility')-&gt;addVisibleInSearchFilterToCollection($this-&gt;_productCollection);
              if(isset($_GET['productid'])){
                $value = $this-&gt;getIdsFromSearchUrl($_GET['productid']);
                if(is_array($value)){
                  foreach($value as $v){ if(is_numeric($v)){ $this-&gt;_productCollection-&gt;addProductFilter(Mage::getModel('catalog/product')-&gt;load($v),true); } }
                } else { if(is_numeric($value)){ $this-&gt;_productCollection-&gt;addProductFilter(Mage::getModel('catalog/product')-&gt;load($value),true); } }
              }
          }
  
          return $this-&gt;_productCollection;
      }
  </code></pre>
  
  <p>It is syntactically correct, but shows no results. And it still requires one other field to be completed, which I have no idea where to change.</p>