title: Magento - Display SKU for All Simple Products
body: <p>In Magento I am trying to display all the SKU's for associated simple products on the product page of the configurable product.  I have used the below code to display all colors but for some reason it doesn't work for all SKU's (I changed attribute text to SKU):</p>
  
  <pre><code>&lt;?php
      $styles = array();
      if($_product-&gt;isConfigurable()){
      $allProducts = $_product-&gt;getTypeInstance(true)-&gt;getUsedProducts(null, $_product);
      foreach ($allProducts as $subproduct) {
  
              $styles[] = '&lt;li&gt;' . $subproduct-&gt;getAttributeText('color') . '&lt;/li&gt;';
  
      }
      if(count($styles)&gt;0) {
          sort($tyles);
          ?&gt;
  
          &lt;ul class="style-list"&gt;
          &lt;? echo implode("", $styles); ?&gt;
          &lt;/ul&gt;
  
          &lt;?
      }
  }
  ?&gt;        
  </code></pre>
  
  <p>Anyone know how to achieve this?</p>