title: Magento: How to display how many times a product has been sold?
body: <p>I want to echo on my homepage the total sales of a product. How can this be done?</p>
  
  <p>Also i would like to know how to query Total items sold (quantity) on the front page. </p>
  
  <p>In my shop, there will be only 1 product (virtual).</p>
  
  <p><strong>Edit</strong>:</p>
  
  <p>I found this code and it works pretty well in the product's view page.</p>
  
  <pre><code>$sku = nl2br($_product-&gt;getSku());
  $_productCollection = Mage::getResourceModel('reports/product_collection')
      -&gt;addOrderedQty()
      -&gt;addAttributeToFilter('sku', $sku)
      -&gt;setOrder('ordered_qty', 'desc')
      -&gt;getFirstItem();
  $product = $_productCollection;
  
  echo 'Already Bought '.(int)$product-&gt;ordered_qty; 
  </code></pre>
  
  <p>But on the front page, how would I point directly to the ID of the product i want?</p>