我试图在navigation.Here中添加按品牌购物是我的代码
<?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;?>显然,输出将我带到搜索结果页面,该页面显示为品牌http://img820.imageshack.us/img820/7303/searchd.jpg的搜索结果。但是我想要没有文本search results for的结果页。
他们有没有其他方式在导航中按品牌展示商店?任何帮助都将不胜感激。
发布于 2011-06-09 21:03:21
就我个人而言,我更喜欢另一种方法,让品牌不是基于属性,而是基于类别(例如,将两个根类别“类别”和“品牌”。一个将持有类别作为子类别,另一个将持有品牌)。
https://stackoverflow.com/questions/6292448
复制相似问题