title: Get magento subtotal from cart
body: <p>I'm currently using this snippet to show the cart totals in the topcart of my Magento shop. My problem is that it's not always updating when products is put in cart, it's just showing 0$, especially configurable products. But when a second product is put in the cart, it's working again. </p>
  
  <p>Am I missing something, should there be a "check" of some kind before this piece of code?</p>
  
  <pre><code>&lt;?php echo Mage::helper('checkout')-&gt;formatPrice($this-&gt;getSubtotal()) ?&gt;
  </code></pre>