overview.phtml 13.4 KB
Newer Older
John Punzalan's avatar
John Punzalan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
<?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
 * @package     base_default
 * @copyright   Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php /** @var $this Mage_Checkout_Block_Multishipping_Overview */ ?>
<div class="multiple-checkout">
    <div class="page-title">
        <h1><?php echo $this->__('Review Order') ?></h1>
    </div>
    <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
    <form action="<?php echo $this->getPostActionUrl() ?>" method="post" onsubmit="return showLoader();">
        <?php echo $this->getBlockHtml('formkey'); ?>
        <div class="col2-set">
            <h2 class="legend"><?php echo $this->__('Billing Information') ?></h2>
            <div class="col-1">
                <div class="box">
                    <?php $_address=$this->getBillingAddress() ?>
                    <div class="box-title">
                        <h3><?php echo $this->__('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingAddressUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h3>
                    </div>
                    <div class="box-content">
                        <address>
                            <?php echo $_address->format('html') ?>
                        </address>
                    </div>
                </div>
            </div>
            <div class="col-2">
                <div class="box">
                    <div class="box-title">
                        <h3><?php echo $this->__('Payment Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingUrl() ?>"><?php echo $this->__('Change') ?></a></h3>
                    </div>
                    <div class="box-content">
                        <input type="hidden" name="payment[cc_number]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcNumber())?>" />
                        <input type="hidden" name="payment[cc_cid]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcCid())?>" />
                        <?php echo $this->getPaymentHtml() ?>
                    </div>
                </div>
            </div>
         </div>
        <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
        <div class="col2-set">
        <h2 class="legend"><?php echo $this->__('Shipping Information') ?></h2>
        <?php foreach ($this->getShippingAddresses() as $_index => $_address): ?>
            <h3 class="legend"><?php echo $this->__('Address %s of %s', ($_index+1), $this->getShippingAddressCount()) ?></h3>
                <div class="col-1 col-narrow">
                    <div class="box">
                        <div class="box-title">
                            <h4><?php echo $this->__('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingAddressUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h4>
                        </div>
                        <div class="box-content">
                            <address>
                                <?php echo $_address->format('html') ?>
                            </address>
                        </div>
                    </div>
                    <div class="box">
                        <div class="box-title">
                            <h4><?php echo $this->__('Shipping Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingUrl() ?>"><?php echo $this->__('Change') ?></a></h4>
                        </div>
                        <div class="box-content">
                            <?php if($_rate=$this->getShippingAddressRate($_address)): ?>
                            <p>
                            <?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?> - <?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
                            <?php $_excl = $this->getShippingPriceExclTax($_address); ?>
                            <?php $_incl = $this->getShippingPriceInclTax($_address); ?>
                            <?php echo $_excl; ?>
                            <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
                                (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
                            <?php endif; ?>
                            </p>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
                <div class="col-2 col-wide">
                    <h4><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressesEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h4>
                    <table class="data-table" id="overview-table-<?php echo $_address->getId() ?>">
                        <col />
                        <col width="1" />
                        <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
                        <col width="1" />
                        <?php endif; ?>
                        <col width="1" />
                        <col width="1" />
                        <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
                        <col width="1" />
                        <?php endif; ?>
                        <thead>
                            <tr>
                                <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Product Name') ?></th>
                                <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Price') ?></th>
                                <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Qty') ?></th>
                                <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
                            </tr>
                            <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
                            <tr>
                                <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
                                <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
                                <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
                                <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
                            </tr>
                            <?php endif; ?>
                        </thead>
                        <tfoot>
                            <?php echo $this->renderTotals($this->getShippingAddressTotals($_address)); ?>
                        </tfoot>
                        <tbody>
                        <?php foreach ($this->getShippingAddressItems($_address) as $_item): ?>
                            <?php echo $this->getRowItemHtml($_item); ?>
                        <?php endforeach; ?>
                        </tbody>
                    </table>
                    <script type="text/javascript">decorateTable('overview-table-<?php echo $_address->getId() ?>')</script>
                </div>
            <?php if($this->getShippingAddressCount()!=$_index+1): ?>
                <div class="divider"></div>
            <?php endif; ?>
        <?php endforeach; ?>
        </div>
        <?php if ($this->getQuote()->hasVirtualItems()): ?>
        <div class="col2-set">
            <h2 class="legend"><?php echo $this->__('Other Items in Your Order') ?></h2>
            <div class="col-1 col-narrow"></div>
            <div class="col-2 col-wide">
                <h3><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h3>
                <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
                <table class="data-table" id="virtual-overview-table">
                    <col />
                    <col width="1" />
                    <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
                    <col width="1" />
                    <?php endif; ?>
                    <col width="1" />
                    <col width="1" />
                    <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
                    <col width="70" />
                    <?php endif; ?>
                    <thead>
                        <tr>
                            <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Product Name') ?></th>
                            <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Price') ?></th>
                            <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Qty') ?></th>
                            <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
                        </tr>
                        <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
                        <tr>
                            <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
                            <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
                            <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
                            <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
                        </tr>
                        <?php endif; ?>
                    </thead>
                    <tfoot>
                        <?php echo $this->renderTotals($this->getBillinAddressTotals()); ?>
                    </tfoot>
                    <tbody>
                    <?php foreach ($this->getVirtualItems() as $_item): ?>
                        <?php echo $this->getRowItemHtml($_item); ?>
                    <?php endforeach; ?>
                    </tbody>
                    </table>
                    <script type="text/javascript">decorateTable('virtual-overview-table')</script>
                </div>
        </div>
        <?php endif; ?>

           <?php echo $this->getChildHtml('items_after'); ?>

            <div id="checkout-review-submit">
                <?php echo $this->getChildHtml('agreements') ?>
                <div class="place-order">
                    <div class="grand-total">
                        <div class="inner">
                            <big><?php echo $this->__('Grand Total:') ?> <?php echo $this->helper('checkout')->formatPrice($this->getTotal()) ?></big>
                            <div id="review-buttons-container">
                                <button type="submit" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" id="review-button"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
                            </div>
                        </div>
                    </div>
                    <span class="please-wait" id="review-please-wait" style="display:none;">
                        <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?>
                    </span>
                </div>
            </div>
            <div class="buttons-set">
                <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Billing Information') ?></a></p>
            </div>
        </form>
        <script type="text/javascript">
        //<![CDATA[
            var submitted = false;

            function showLoader()
            {
                if (submitted) {
                    return false;
                }
                if ($('checkout-agreements')) {
                    var checkboxes = $$('#checkout-agreements input');
                    for (var i=0, l=checkboxes.length; i<l; i++) {
                        if (!checkboxes[i].checked) {
                            alert("<?php echo $this->__('Please agree to all Terms and Conditions before placing the orders.')?>");
                            return false;
                        }
                    }
                }

                submitted = true;
                var step='review';
                Element.show(step+'-please-wait');
                $(step+'-buttons-container').setStyle({opacity:.5});
                $(step+'-buttons-container').descendants().each(function(s) {
                      s.disabled = true;
                });
                return true;
            }
        //]]>
        </script>
</div>