<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category   design_default
 * @package    Mage
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/**
 * Shoping cart sidebar
 *
 * @see Mage_Checkout_Block_Cart_Sidebar
 */
?>
<div class="box base-mini mini-cart">
    <div class="head">
        <?php $_cartQty = $this->getSummaryCount() ?>
        <h4><?php echo $this->__('My Cart') ?></h4>
        <?php if ($_cartQty>0): ?>
            <?php if ($_cartQty==1): ?>
                <?php echo $this->__('There is <a href="%s"><strong>1 item</strong></a> in your cart.', $this->getUrl('checkout/cart')) ?>
            <?php else: ?>
                <?php echo $this->__('There are <a href="%s"><strong>%s items</strong></a> in your cart.', $this->getUrl('checkout/cart'), $_cartQty) ?>
            <?php endif ?>
            <p class="subtotal">
                <?php echo $this->__('Cart Subtotal:') ?> <strong><?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?></strong>
                <?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
                    <br />(<strong><?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?></strong> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
                <?php endif; ?>
            </p>
        <?php endif ?>
    </div>

    <?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
    <div class="actions">
        <button class="form-button" type="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')">
            <span><?php echo $this->__('Checkout') ?></span>
        </button>
    </div>
    <?php endif ?>

    <?php $_items = $this->getRecentItems() ?>
    <?php if(count($_items)): ?>
    <h5><?php echo $this->__('Recently added item(s)') ?></h5>
    <ol id="cart-sidebar">
    <?php foreach($_items as $_item): ?>
        <?php echo $this->getItemHtml($_item) ?>
    <?php endforeach; ?>
    </ol>
    <script type="text/javascript">decorateList('cart-sidebar', 'non-recursive')</script>
    <?php else: ?>
    <div class="content"><p><?php echo $this->__('You have no items in your shopping cart.') ?></p></div>
    <?php endif ?>
</div>
<!-- [ends] .cart-sidebar // -->