I'm using below code to get product collection,
$products = Mage::getResourceModel('catalog/product_collection') ->AddAttributeToSelect('name') ->addAttributeToSelect('price') ->addAttributeToSelect('small_image') ->addAttributeToSelect('image') ->addFieldToFilter('size', array('eq' => '40')) ->AddCategoryFilter($category);
->addFieldToFilter('size', array('eq' => '130')) i'm trying to filter product collection by it's size.
As a result i'm getting empty result coz, my configurable product don't have attribute
I've tried to include child product collection by
->joinTable('catalog/product_relation', 'child_id=entity_id', array( 'parent_id' => 'parent_id' ), null, 'left')
but not working, did anyone know how to consider associated products while filtering ?