<?php
/**
 * aheadWorks Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://ecommerce.aheadworks.com/LICENSE-M1.txt
 *
 * @category   AW
 * @package    AW_Mobile
 * @copyright  Copyright (c) 2010-2011 aheadWorks Co. (http://www.aheadworks.com)
 * @license    http://ecommerce.aheadworks.com/LICENSE-M1.txt
 */
?>
<?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
    <strong><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></strong>
<?php else: ?>
<dl class="shipment-methods">
    <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
        <dt><?php echo $this->getCarrierName($code) ?></dt>
        <dd>
            <ul>
            <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
                <li>
                   <?php if ($_rate->getErrorMessage()): ?>
                    <ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
                   <?php else: ?>
                        <?php if ($_sole) : ?>
                        <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
                        <?php else: ?>
                        <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> />
                        <?php endif; ?>
                        <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
                        <strong>
                        <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
                        <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>

                        <?php echo $_excl; ?>
                        <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
                            (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
                        <?php endif; ?>
                        </strong>
                        </label>
                   <?php endif ?>
                </li>
            <?php endforeach; ?>
            </ul>
        </dd>
    <?php endforeach; ?>
</dl>
<?php endif; ?>
