|
Interesting…
Did you think about layered Navigation? ehehe
Just kidding, but seriously.
Are you planning to use this just on the main page?
Here is some ideas:
1) Layered Navigation for only the two attributes that you need. ( the problem that I see is that the results will show on the main page).
This code goes in the /app/design/frontend/default/Your_Theme/template/catalog/layer/filter.phtml , but you might have to play around with it, since you do not want to mess up the layered navigation to all other categories.
In my case, I also restricted the results not to show until there is only one product. Maybe you can use it to take you to another page once the results are selected.
/** * Template for filter items block * Coded by Adam Martin (www.tweakmag.com) * * * @see Mage_Catalog_Block_Layer_Filter */ ?>
<?php //control the way that the layered navigation attributes present themselves //either dropdown list or default methd (ordered list) $attributeName = $this->getName(); $itemcountthreshold = 1; // you can change this $itemcount = $this->getItemsCount(); $displayitemcount = false; //set to true/false to display item count in brackets if($itemcount > $itemcountthreshold){ $attributeName = "Overthreshold"; } if(!function_exists("_displayOrderedlist")){ function _displayOrderedlist($atts,$displayitemcount){ echo '<ol>'; foreach($atts->getItems() as $_item){ echo '<li><a href="'.$_item->getUrl().'">'.$_item->getLabel().'</a>'; if($displayitemcount){ echo ' ('.$_item->getCount().')'; } echo '</li>'; } echo '</ol>'; } } if(!function_exists("_displayDropdown")){ function _displayDropdown($atts,$displayitemcount){ echo '<select id="layered-select" class="select" name="layered-select" onchange="if (this.selectedIndex > 0) location.href=this[this.selectedIndex].value;">'; echo '<option selected="selected">Please select</option>'; foreach ($atts->getItems() as $_item){ echo '<option value="'.$_item->getUrl().'">'; echo $_item->getLabel(); if($displayitemcount){ echo ' ('.$_item->getCount().')'; } echo '</option>'; } echo '</select>'; } } switch ($attributeName) { case '********************************************************************INSERT HERE ATTRIBUTE 1************************': case '********************************************************************INSERT HERE ATTRIBUTE 2************************': case 'Overthreshold': _displayDropdown($this,$displayitemcount); break; default: _displayOrderedlist($this,$displayitemcount); break; } ?>
Thanks for the code Adam www.tweakmag.com
2) Advance search seems to be the best idea, since the results will show in another page that can be further filtered by you client to find what they are looking for.
Since I’m not a programmer and I know nothing of PHP, I had a hard time figuring this one out.
Issue for me was to limit the attributes to search and still be able to the use advance search somewhere else.
I believe that the file to change is this /app/design/frontend/default/default/template/catalogsearch/advanced/form.phtml
Maybe you could use this on your store, since I did not see the Advance Search anywhere on your page.
- go to catalog>attributes>manage Attributes
- Select the attribute that you WANT to show in Advance Search and in “Use in Advance Search” put yes
- Do the same with the all the other ones and in “Use in Advance Search” put no
- Change the phtml that is being used by the advance form and CSS to as a miniform
- Call the miniform in your homepage.
Hope this gave you ideas. Believe me If I knew how to do it, I would tell you since many people in the forum always helped me out.
|