I need to find the products that exists in category 93 AND 97. So far i am able to get products that exists in category 93 OR 97, but no luck with AND instead.
Im really clueless right now, and have done a lot of google search now.
Any help is appreciated!
Code so far:
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->distinct(true);
$collection->joinField('category_id',
'catalog/category_product',
'category_id',
'product_id=entity_id',
null,
'left');
$collection->addAttributeToFilter('category_id', array( 'in' =>
array('finset'=> '93'),
array('finset'=> '97')));
Magento Enterprise version 1.13.0.0
Take a look @ How to get products that are found in 2 or more categories