<?php
/**
 * TemplateMela
 * @copyright  Copyright (c) 2010 TemplateMela. (http://www.templatemela.com)
 * @license    http://www.templatemela.com/license/
 */
 
?>
<?php $_cartdropdown = Mage::getStoreConfig('cartdropdown/general'); ?>

<div class="block-cart btn-slide">
<?php $_cartQty = $this->getSummaryCount() ?>	
	<div class="cart-label">
	
	<div class="cart_mini_right">
			<div class="cart_text">Shopping Cart</div>
             <div class="cart_item"><?php if ($_cartQty==0): ?>
                <?php echo $this->__('0') ?>
            <?php elseif ($_cartQty==1): ?>
				 <?php echo $this->__('1') ?>
			<?php else: ?>	 	
                <?php echo $this->__('%s', $_cartQty) ?>
            <?php endif ?></div>
			<?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
			<div class="right_arrow"></div>
	</div>		
	</div>
	
	<div class="block-content" id="panel">
	<div class="top_arrow"></div>
		<div class="cart_topbg">
		<div class="main-cart">
		<?php $_items = $this->getRecentItems() ?>
		
		<?php if(count($_items)): ?>
			<p class="block-subtitle"><?php echo $this->__('Recently added item(s)') ?></p>
			<ol id="cart-sidebar" class="mini-products-list">
			<?php foreach($_items as $_item): ?>
				<?php echo $this->getItemHtml($_item) ?>
			<?php endforeach; ?>
			</ol>
			<script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>
		<?php else: ?>
			<p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
		<?php endif ?>
		
		
		<?php if ($_cartQty>0): ?>
			<div class="summary">           
				<p class="subtotal">
					<?php if ($this->canApplyMsrp()): ?>
						<span class="map-cart-sidebar-total"><?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></span>
					<?php else: ?>
						<span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
						<?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
							<br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
						<?php endif; ?>
					<?php endif; ?>
				</p>
			</div>
		<?php endif ?>
		<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
		<div class="actions">
			<?php echo $this->getChildHtml('extra_actions') ?>			
			<button type="button" title="<?php echo $this->__('Checkout') ?>" class="button checkout-btn" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>
			
			<button type="button" title="<?php echo $this->__('View Cart') ?>" class="button viewcart-btn" onclick="setLocation('<?php echo $this->getUrl('checkout/cart') ?>')"><span><span><?php echo $this->__('View Cart') ?></span></span></button>
		</div>
		<?php endif ?>
		</div>
	</div>	
</div>
</div>
