<?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)
 */
?>
<div class="box one-page-checkout-progress">
        <h3><?php echo $this->__('Your Checkout Progress') ?></h3>
    <ol>
    <?php if ($this->getCheckout()->getStepData('billing', 'is_show')): ?>
    <?php if ($this->getCheckout()->getStepData('billing', 'complete')): ?>
        <li>
            <h4 class="complete"><?php echo $this->__('Billing Address') ?> <span class="separator">|</span> <a href="#billing" onclick="checkout.accordion.openSection('opc-billing'); return false;"><?php echo $this->__('Change Billing Address') ?></a></h4>
            <div class="content">
                <address><?php echo $this->getBilling()->format('html') ?></address>
            </div>
        </li>
    <?php else: ?>
        <li>
            <h4><?php echo $this->__('Billing Address') ?></h4>
        </li>
    <?php endif; ?>
    <?php endif; ?>

    <?php if ($this->getCheckout()->getStepData('shipping', 'is_show')): ?>
    <?php if ($this->getCheckout()->getStepData('shipping', 'complete')): ?>
        <li>
            <h4 class="complete"><?php echo $this->__('Shipping Address') ?> <span class="separator">|</span> <a href="#payment" onclick="checkout.accordion.openSection('opc-shipping');return false;"><?php echo $this->__('Change Shipping Address') ?></a></h4>
            <div class="content">
                <address><?php echo $this->getShipping()->format('html') ?></address>
            </div>
        </li>
    <?php else: ?>
        <li>
            <h4><?php echo $this->__('Shipping Address') ?></h4>
        </li>
    <?php endif; ?>
    <?php endif; ?>

    <?php if ($this->getCheckout()->getStepData('shipping_method', 'is_show')): ?>
    <?php if ($this->getCheckout()->getStepData('shipping_method', 'complete')): ?>
        <li>
            <h4 class="complete"><?php echo $this->__('Shipping Method') ?> <span class="separator">|</span> <a href="#shipping_method" onclick="checkout.accordion.openSection('opc-shipping_method'); return false;"><?php echo $this->__('Change Shipping Method') ?></a></h4>
            <div class="content">
            <?php if ($this->getShippingMethod()): ?>
                <?php echo $this->getShippingDescription(); ?>

                <?php $_excl = $this->getShippingPriceExclTax(); ?>
                <?php $_incl = $this->getShippingPriceInclTax(); ?>
                <?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
                    <?php echo $_incl; ?>
                <?php else: ?>
                    <?php echo $_excl; ?>
                <?php endif; ?>
                <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
                    (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
                <?php endif; ?>

            <?php else: ?>
                <?php echo $this->__('Shipping method has not been selected yet') ?>
            <?php endif ?>
            </div>
        </li>
    <?php else: ?>
        <li>
            <h4><?php echo $this->__('Shipping Method') ?></h4>
        </li>
    <?php endif; ?>
    <?php endif; ?>

    <?php if ($this->getCheckout()->getStepData('payment', 'is_show')): ?>
    <?php if ($this->getCheckout()->getStepData('payment', 'complete')): ?>
        <li>
            <h4 class="complete"><?php echo $this->__('Payment Method') ?> <span class="separator">|</span> <a href="#payment" onclick="checkout.accordion.openSection('opc-payment');return false;"><?php echo $this->__('Change Payment Method') ?></a></h4>
            <div class="content">
                <?php echo $this->getPaymentHtml() ?>
            </div>
        </li>
    <?php else: ?>
        <li>
            <h4><?php echo $this->__('Payment Method') ?></h4>
        </li>
    <?php endif; ?>
    <?php endif; ?>
    </ol>
</div>