if(product->isConfigurable()){
}
$allProducts=$product->getTypeInstance(true)->getUsedProducts(null, $product);
echo count($allProducts);
foreach($allProducts as $simpleProduct){
echo $simpleProduct->getId().'<br/>';
}
if(product->isConfigurable()){
}
$allProducts=$product->getTypeInstance(true)->getUsedProducts(null, $product);
echo count($allProducts);
foreach($allProducts as $simpleProduct){
echo $simpleProduct->getId().'<br/>';
}