Building a minicart on top bar in magento theme. Need to show products thumbnail and name in minicart. I have made a file top_cart.phtml in directory "checkout/cart". Using the code given below.
<?php
$_cartQty = $this->getSummaryCount();
$session = Mage::getSingleton('checkout/session');
if ($_cartQty == 0) : ?>
<span class="titleBlock">Your shopping cart is empty.</span>
<?php else :
foreach($session->getQuote()->getAllItems() as $_item): ?>
<div>
<span><?php echo $_item->getThumbnailImage(); ?></span>
<span><?php echo $_item->getName(); ?></span>
</div>
<?php endforeach ?>
<?php endif;?>
?>
Now the name is shown correctly but the thumbnail images are not being shown. Guide plz.