0
특정 카테고리의 제품이있는 모든 제조업체를 링크로 표시하려고합니다. 작동 방식 :Magento 카테고리의 제품을 가진 제조 업체 목록을 찾으시겠습니까?
$category = 56;
$layer = Mage::getModel("catalog/layer");
$layer->setCurrentCategory($category);
$attributes = $layer->getFilterableAttributes();
$manufacturers = array();
foreach ($attributes as $attribute) {
if ($attribute->getAttributeCode() == 'manufacturer') {
$filterBlockName = 'catalog/layer_filter_attribute';
$result = Mage::app()->getLayout()->createBlock($filterBlockName)->setLayer($layer)->setAttributeModel($attribute)->init();
foreach($result->getItems() as $option) {
echo '<li><a href="'.$this->getUrl('').'bats.html?manufacturer=' .$option->getValue().'">'.$option->getLabel().'</a></li>';
}
}
}
하지만 제조업체 - 카테고리 페이지 중 하나에있을 때 속성 링크가 사라집니다. 레이어드 네비게이션 모델을 사용하고 있기 때문에 가정합니다.
계층 적 탐색 모델을 사용하지 않고 특정 범주의 제조업체 목록을 가져올 수 있습니까?