Hey guys,
I have the following code to grab a list of Products
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('name')
->addAttributeToFilter("category_ids", array('finset'=>$this->category_id));
foreach($collection as $product) {
echo $product->getName();
}
My question is, how can I NOT echo products that are 'simple' but belong to a parent 'configurable' product. (for example don't show "Red Shirt Medium" as it belongs to "Red Shirt")
I have worked out that this association lives in 'catalog_product_super_link
' but I have only just started with Magento and unfortuantely don't know how to do the filtering :)
Cheers guys,
Chris.