<?php
$attribute = Mage::getModel('eav/entity_ attribute')
->loadByCode('catalog_ product', 'manufacturer');
$valuesCollection = Mage::getResourceModel('eav/ entity_attribute_option_ collection')
->setAttributeFilter($ attribute->getData('attribute_ id'))
->setPageSize(100)
->setPositionOrder('asc')
->setStoreFilter(0, false);
$preparedManufacturers = array();
foreach($valuesCollection as $value) {
$preparedManufacturers[$value- >getOptionId()] = $value->getValue();
}
if (count($preparedManufacturers) ) {
foreach($ preparedManufacturers as $optionId => $value) {
?>
<li><a href="<?php echo Mage::getBaseUrl(Mage_Core_ Model_Store::URL_TYPE_WEB); ?>catalogsearch/advanced/ result/?manufacturer[]=<?php echo $optionId; ?>"><?php echo $value; ?></a></li>
<?php
}
}
?>
No comments:
Post a Comment