I have Magento ver. 1.5.0.1 and I need to add filter to product.Like I have 2 categories 'A' and 'B',result should be shown only if product exist in both('A' and 'B') categories.I have used this code but no success
$_productCollection = Mage::getModel('catalog/product') ->getCollection() ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left') ->addAttributeToSelect('*') ->addAttributeToFilter('category_id', array( array('finset' => '4'),array('finset' =>'5'))) ->addAttributeToSort('created_at', 'desc');
Any help will be highly appreciated
Thanks