Showing results for 
Search instead for 
Did you mean: 

how to getselectbox to return results

how to getselectbox to return results


Trying to build a test website

From here you can see where it says Projector Lamp it says select manufacturer it currently shows 2, However if you select one it doesn't do anything at the moment.


I would like it to then give me the option of a model. so if select nec the second box would show 2 models I then click one and it takes me to that page.


so in functions.php I have this code.

function getSelectBox($attributeCode, $label = '', $defaultSelect = null, $extraParams = null){
$options = array();
$product = Mage::getModel(
$attribute = $product->getResource()->getAttribute($attributeCode);
$options = $attribute->getSource()->getAllOptions(
array_unshift($options, array(
'label' => $label, 'value' => ''));

$select = Mage::app()->getLayout()->createBlock(
return $select->getHtml();


and on my main page I have this

Step 1. Select your Manufacturer -
<?php echo getSelectBox('manufacturer', 'Select Manufacturer'); ?>
Step 2. Select your Model -
<?php echo getSelectBox('name', 'Select Model'); ?>


I am trying to create a new website for our current store but need the lampfinder to work. here is our current store so you can see the section trying to recreate.


I appreciate any help I can get