$brandId = "1"; //manufacturer id or brand id
$products = Mage::getModel('catalog/product')->getCollection();
$products->addAttributeToFilter('manufacturer', array('in' => array($brandId)));
$products->addAttributeToFilter('status', '1');
$products->addAttributeToSelect('*');
$products->load();
echo "";
$products = Mage::getModel('catalog/product')->getCollection();
$products->addAttributeToFilter('manufacturer', array('in' => array($brandId)));
$products->addAttributeToFilter('status', '1');
$products->addAttributeToSelect('*');
$products->load();
echo "";
foreach($products as $product)
echo $product->getId()."
";
No comments:
Post a Comment