cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create filter dropdown list?

How do I create filter dropdown list?

Hi all and how are you all, I want to create a dropdown list similar to the one in the image and link below. 

This company has it on there home page another exmple; www.autostylinguk.co.uk

 

www.autoartltd.co.uk

 

 

Thanks in advance for all your help.

 

Kind Regards

 

bow103

4 REPLIES 4

Re: How do I create filter dropdown list?

So far at the moement I have the following; 

 

<?php
function getSelectBox($attributeCode, $label = '', $defaultSelect = null, $extraParams = null){
$options = array();
$product = Mage::getModel('catalog/product');
$attribute = $product->getResource()->getAttribute($attributeCode);
if($attribute->usesSource()){
$options = $attribute->getSource()->getAllOptions(false);
array_unshift($options, array('label' => $label, 'value' => ''));
}

$select = Mage::app()->getLayout()->createBlock('core/html_select')
->setName($attributeCode)
->setId($attributeCode)
->setTitle($label)
->setValue($defaultSelect)
->setExtraParams($extraParams)
->setOptions($options);
return $select->getHtml();
}
?>

<?php echo getSelectBox('manufacturer', 'Select Manufacturer'); ?>

Re: How do I create filter dropdown list?

you can probably try this cacading dropdown plugin

http://www.dnasir.com/github/jquery-cascading-dropdown/demo.html

Re: How do I create filter dropdown list?

There is a extension for this purpose, Once installed the users to search by Year, Make and Model and any other attribute that you want to set, Import / Export artibute using CSV file to increase the search filter,

 

For more details view - http://www.fmeextensions.com/magento-year-make-model-attributes.html

 

Working on one of our customers website - factorywheelstoday.anylinuxwork.in

 

 

Magento Extensions and Services Provider

Best Rated Extensions
Top Notch Support and Service

Re: How do I create filter dropdown list?

How do I close this open topic as I have sorted out the soloution?