$brandLabel = $_product->getAttributeText('manufacturer');
$option_id = $attr->getSource()->getOptionId($brandLabel);
$attrcode="manufacturer";
$product_collection=Mage::getModel("catalog/product")->getCollection();
$product_collection->addAttributeToFilter($attrcode,$option_id);
foreach($product_collection as $_product){
$_product = Mage::getModel('catalog/product')->load($_product->getId());
}
$option_id = $attr->getSource()->getOptionId($brandLabel);
$attrcode="manufacturer";
$product_collection=Mage::getModel("catalog/product")->getCollection();
$product_collection->addAttributeToFilter($attrcode,$option_id);
foreach($product_collection as $_product){
$_product = Mage::getModel('catalog/product')->load($_product->getId());
}
No comments:
Post a Comment