title: How can I show configurable product stock quantity in Magento?
body: <p>I have made this code to show if some configurable product has or not stock. But I can't get the stock quantity anywhere in varien/product.js</p>
  
  <pre><code>updateStock: function(){
      var tempProducts = [];
      var allowedProducts = [];
  
      var idColor = jQuery('#attribute85').val();
      var idTalla = jQuery('#attribute127').val();
  
      // productos por color 
      var options = this.getAttributeOptions(85);
      for (var i = 0; i &lt; options.length; i++ ) {
          if (options[i].id == idColor) {
              for (var j = 0; j &lt; options[i].products.length; j++) {
                  tempProducts.push(options[i].products[j]);
              }
          }
      }
  
      jQuery('#input-box-127 a').each(function(index) {
          // jQuery(this).find('.talla').removeClass('seleccionado');
          jQuery(this).find('div').addClass('sin_stock');
  
          idTalla = jQuery(this).attr('rel');
          options = spConfig.getAttributeOptions(127);
          for (var i = 0; i &lt; options.length; i++ ) {
              if (options[i].id == idTalla) {
                  for (var j = 0; j &lt; options[i].products.length; j++) {
                      for (var index = 0; index &lt; tempProducts.length; index++) {
                          if (tempProducts.indexOf(options[i].products[j]) &gt; -1) {
                              //alert(jQuery(this).text());
                              jQuery(this).find('div').removeClass('sin_stock');
                          }
                      }
                  }
              }
          }
      });
  
      return allowedProducts.length &gt; 0;
  }, 
  </code></pre>
  
  <p>Is there any variable in magento where I can get the configurable product stock?</p>