I am trying to develop custom filter navigation. Below is the code for product collection by category id
$category = Mage::getModel ('catalog/category')->load($category_id);
$products = Mage::getResourceModel('catalog/product_collection')
// ->addAttributeToSelect('*')
->AddAttributeToSelect('name')
->addAttributeToSelect('price')
->addFinalPrice()
->addAttributeToSelect('small_image')
->addAttributeToSelect('image')
->addAttributeToSelect('thumbnail')
->addAttributeToSelect('short_description')
->addUrlRewrite()
->AddCategoryFilter($category);
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
//$products->addAttributeToFilter('color', array('eq' => '27')); /* here color attribute */
Product collection by category id is working as expected. But when i tried with single color attribute, it always comes asreturns an empty array.Same Same color 27 attribute gives one product as result when i check on default navigation.
AnyWhat is the best way to achieve multiple attribute code filter with resource model catalog product collection. Please advice?