title: Add a cart link (with number of items) in the sidebar in Magento
body: <p>I'm faced with a unique problem from a unique customer. In Magento's account screen, there are typically two places where &quot;My Cart&quot; makes an appearance; the top bar, and in the sidebar as a block. However, I've been tasked with removing those and placing a link (with the number of items in the cart) in the &quot;My Account&quot; section of the sidebar.</p>
  <p>It appears that as a new user, I cannot post any images. This is going to pose a problem.</p>
  <blockquote>
  <p>MY ACCOUNT</p>
  <p>Dashboard<br />
  Address Book<br />
  My Cart (2 items)  &lt;---- This link here. Within this area, and showing the number of items<br />
  My Orders<br />
  My Product Reviews<br />
  May Tags
  Newsletter Subscriptions</p>
  </blockquote>
  <p>Now, adding the link itself is problem. In fact, it's quite simple and accomplished by</p>
  <pre><code>&lt;action method=&quot;addLink&quot; translate=&quot;label&quot; module=&quot;checkout&quot;&gt;&lt;name&gt;cart&lt;/name&gt;&lt;path&gt;checkout/cart/&lt;/path&gt;&lt;label&gt;My Cart&lt;/label&gt;&lt;/action&gt;
  </code></pre>
  <p>within the customer.xml file.</p>
  <p>The problem stems from listing the items in the cart within that area. If this site were only in English, a few &quot;if&quot; statements inside of code\core\Mage\Customer\Block\Account\Navigation.php would resolve it. However, all translation seems to be done before the addItem function is called to add those links to the menu.</p>
  <p>I figure that if the number of items in the cart could be displayed before addItem is called, this problem would be solved, but all php from inside of the  tags gets ignored.</p>
  <p>If anyone has a solution or any clues to this, it would be greatly appreciated! Thanks for taking the time to read this.</p>