Magento - Get Configurable Product Available Sizes
<p>I'm trying to get all the available sizes of my configurable product inside the list.phtml grid.</p>

<p>With the code below I can succesfully get all the sizes, but it show even the not available sizes.</p>

<pre><code>    &lt;?php if($_product-&gt;isSaleable()): ?&gt;
    &lt;div class="taglie"&gt;
    &lt;?php $cProduct = Mage::getModel('catalog/product')-&gt;load($_product-&gt;getId());
    //check if product is a configurable type or not
    if ($cProduct-&gt;getData('type_id') == "configurable") {
        //get the configurable data from the product
        $config = $cProduct-&gt;getTypeInstance(true);
        //loop through the attributes
        foreach($config-&gt;getConfigurableAttributesAsArray($cProduct) as $attributes) { ?&gt;
            &lt;?php foreach($attributes["values"] as $values) {
                echo "&lt;span&gt;".$values["label"]."&lt;/span&gt;";
            } ?&gt; 
        &lt;?php 
        } 
    } ?&gt;
&lt;/div&gt;
&lt;?php else: ?&gt;
    &lt;?php echo $this-&gt;__('Out of Stock') ?&gt;
&lt;?php endif; ?&gt;
</code></pre>

<p>What I'm trying to do is hide the not available sizes option.</p>