Showing results for 
Search instead for 
Did you mean: 

Controller Product Collection to result page

Controller Product Collection to result page



I've created a custom controller to pull some products or essentially a small custom search form. How would I display my product collection on our search results page?


Thank You,



Re: Controller Product Collection to result page

You should use the default Magento functionality. Thus, you will avoid some tricky moments.


- For this purpose I would use the Mage_Catalog_Block_Product_List block.

Create your own block (that will be extended to another one):

- Inside of it, rewrite all what you need to. As I assume, you need to re-write all the stuff related to the category (if I've understood it correctly, to the one that doesn't exist)

- Next you need to assign this block to our action:

- Thus, without changing the collection, you will get the category root page:


By analogy, you can use the search results page. However, I assume that there you'll have to change a bigger amount of methods.

If such blocks as, for example, toolbar are not important to you, you may simplify the task: just use your own block where you can get the collection and the  'to the one, as' template. 

Innovative, top-performing Magento Extensions (with an array of FREE tools).