开发者

Magento Shop by Brands [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 9 years ago.

Improve this question

I 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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜