magento display attribute in dropdown


magento display attribute in dropdown

Create a attribute
and then
edit app/code/core/Mage/Catalog/Block/Navigation.php

public function getAllManu()
 {
 $product = Mage::getModel('catalog/product');
 $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
 ->setEntityTypeFilter($product->getResource()->getTypeId())
 ->addFieldToFilter('attribute_code', 'manufacturer'); //can be changed to any attribute
 $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
 $manufacturers = $attribute->getSource()->getAllOptions(false);
 return $manufacturers;
 }

and then
edit app/design/frontend/default/default/template/catalog/navigation/top.phtml


    

You may also like...

%d bloggers like this: