0

I want to create product finder page same as listing of products in catalog page. Here I have product listing page: enter image description here In this page I have filter and products as per chosen category.

Now I want the page like here: enter image description here

So I think I have to create duplicate listing page of catalog module and put only simple page where all sidebar data will display without any products.

Please suggest how to create Product Finder Page?

0

I have created one Module

On landing page it will show entire collection of your store then you can filter it like normal product list.

In Hpl_Productlist_Model_Layer protected function _getCollection()

$collection = Mage::getModel('catalog/product')->getCollection();
return $collection;

You can set URL Key in Hpl_Productlist_Controller_Router

const NEW_PRODUCTS_URL_KEY = '<YOUR URL KEY>';

update controller

    public function indexAction()
    {
        $this->loadLayout();
        if(count($this->getRequest()->getParams()) >0)
        {
            $update = $this->getLayout()->getUpdate();
             $xml = "<reference name='content'><remove name='new_products_container'><block type='core/template' name='finder.page' template='finder/page.phtml'/></reference>";
            $update->addUpdate($xml);
        }
        $this->renderLayout();
    }

create template finder/page.phtml

  • Will it display all products when I land on URL page? – dekts Feb 23 '17 at 6:34
  • @JackPirates Yes. On url page it will load your entire product list. check __getCollection() function – Gopal Patel Feb 23 '17 at 7:22
  • I think you didn't getting my question. You are correct but what I want is the second page you can see in screenshot without any product when land on page. – dekts Feb 23 '17 at 7:50
  • @JackPirates you can display none that on landing page. and after selection on any filter it will work as per your requirement . You have to do some customization like if there is no parameter then set your template in content block – Gopal Patel Feb 23 '17 at 8:13
  • If I create one new category and add all the products in new category then put one condition in list.phtml (<?php if(strpos($currentUrl,'product-finder.html') == false): ?>) then display all products and if TRUE then not display any products. Can I do this way? – dekts Feb 23 '17 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.