Magento Shop by Brands [closed]
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this questionI am trying to add shop by brands in navigation.Here is my cod开发者_StackOverflowe
<?php
$product=Mage::getModel('catalog/product');
$attributeInfo=Mage::getResourceModel('eav/entity_attribute_collection')->addFieldToFilter('attribute_code','shoe_type')->load(false);
$attribute=$attributeInfo->getFirstItem()->setEntity($product->getResource());
$shoes=$attribute->getSource()->getAllOptions(false);
$url='catalogsearch/result/?q=';
foreach($shoes as $shoe):
$val=$shoe['label'];
?>
<a href="<?php echo Mage::getURL().$url.$val?>"><?php echo $shoe['label']?></a>
<?php endforeach;?>
Obviously,output takes me to search results page which displays as Search Results for brand http://img820.imageshack.us/img820/7303/searchd.jpg. But i want result page without the text search results for
.
Is their any other way to display shop by brands in navigation?Any help will be appreciated.
Personally I prefer another approach making brands not on attributes but categories (e.g. make two root categories "Categories" and "Brands". one will hold categories as sub-categories and another brands).
精彩评论