The following function just gets all saleable (if saleable check is enabled in the Magento configuration) child products from a configurable product:
/**
* Get saleable simple products from configurable parent product
*
* @var Mage_Catalog_Model_Product_Type_Configurable $oParentProduct
* @return array of Mage_Catalog_Model_Product(Mage_Catalog_Model_Product_Type_Simple)
*/
public function getAllowedProducts($oParentProduct)
{
$aProducts = [];
$bSkipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck();
$oAllProducts = $oParentProduct
->getTypeInstance(true)
->getUsedProducts(null, $oParentProduct);
foreach ($oAllProducts as $oProduct) {
if ($oProduct->isSaleable() || $bSkipSaleableCheck) {
$aProducts[] = $oProduct;
}
}
return $aProducts;
}
