I want to select ids of a specific brand when I have the name and the Id of a product for example 111
I found out the ID of manufacturer by using
I used this code in template/catalog/product/list.phtml :
$_productCollection=$this->getLoadedProductCollection(); $_collection_selected=$_productCollection->addAttributeToFilter('manufacturer', array('eq' => 111)); foreach ($_collection_selected as $_product_selected): $product_selected_ids=$_product_selected->getId(); print_r($product_selected_ids); endforeach;
but it shows me all the products I don't know what is wrong?