I have an grouped product in Magento. Before I display the items associated with the group, I want to make sure each associated product is saleable. I'm testing by switching the 'Enabled/Disabled' status in the simple product's admin.
$sku = 'SKU1234'; // grouped product
$cpm = Mage::getModel('catalog/product');
$grouped_product = $cpm->load($cpm->getIdBySku($sku));
$associated = $cpm->getTypeInstance(true)->getAssociatedProducts($grouped_product);
foreach ($associated as $a_p) echo $a_p->isSaleable();
Regardless of the Disabled/Enabled status of an associated product, the above is always printing out a '1' for each associated product, whereas I would expect a '2' for 'Disabled.'
What am I missing?
Thanks for any help