<?php
/**
 * OpenMage
 *
 * 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 at https://opensource.org/license/afl-3-0-php
 *
 * @category    design
 * @package     default_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
 * @copyright   Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<div class="page-create-order">
<p class="switcher">
<label for="currency_switcher"><?php echo Mage::helper('sales')->__('Order Currency:') ?></label>
<select id="currency_switcher" name="order[currency]" onchange="order.setCurrencyId(this.value); order.setCurrencySymbol(this.options[this.selectedIndex].getAttribute('symbol'));">
    <?php foreach ($this->getAvailableCurrencies() as $_code): ?>
    <option value="<?php echo $_code ?>"<?php if($_code==$this->getCurrentCurrencyCode()): ?> selected="selected"<?php endif ?> symbol="<?php echo $this->getCurrencySymbol($_code) ?>"><?php echo $this->getCurrencyName($_code) ?></option>
    <?php endforeach ?>
</select>
</p>
    <script type="text/javascript">
        order.setCurrencySymbol('<?php echo Mage::helper('core')->jsQuoteEscape($this->getCurrencySymbol($this->getCurrentCurrencyCode())) ?>')
    </script>
<table cellspacing="0" width="100%">
<tr>
    <?php if($this->getCustomerId()): ?>
    <td class="side-col" style="background:none; padding:0;">
        <div id="order-sidebar"><?php echo $this->getChildHtml('sidebar') ?></div>
    </td>
    <?php endif ?>
    <td <?php if($this->getCustomerId()): ?>class="main-col"<?php endif ?>>
       <div id="order-additional_area" style="display:none" class="order-additional-area"><?php echo $this->getChildHtml('additional_area') ?></div>
       <div id="order-search" style="display:none" class="order-search-items"><?php echo $this->getChildHtml('search') ?></div>
        <div id="order-items"><?php echo $this->getChildHtml('items') ?></div>
        <div id="order-errors"><?php echo $this->getChildHtml('errors') ?></div>
        <div id="order-form_account"><?php echo $this->getChildHtml('form_account') ?></div>
        <div id="order-addresses">
            <div id="order-billing_address" class="box-left"><?php echo $this->getChildHtml('billing_address') ?></div>
            <div id="order-shipping_address" class="box-right"><?php echo $this->getChildHtml('shipping_address') ?></div>
        </div>
        <div class="clear"></div>
        <div id="order-methods">
            <div id="order-billing_method" class="box-left payments"><?php echo $this->getChildHtml('billing_method') ?></div>
            <div id="order-shipping_method" class="box-right"><?php echo $this->getChildHtml('shipping_method') ?></div>
        </div>

        <?php if($this->getChild('card_validation')): ?>
        <div class="clear"></div>
        <div id="order-methods">
            <div id="order-card_validation" class="box-left payments"><?php echo $this->getChildHtml('card_validation') ?></div>
        </div>
        <?php endif ?>

        <div class="clear"></div>
        <?php echo $this->getChildHtml('gift_options') ?>

        <div class="clear"></div>
        <div class="box-left entry-edit">
            <div class="entry-edit-head"><h4><?php echo Mage::helper('sales')->__('Order History') ?></h4></div>
            <fieldset id="order-comment"><?php echo $this->getChildHtml('comment') ?></fieldset>
        </div>
        <div class="box-right entry-edit">
            <div class="entry-edit-head"><h4><?php echo Mage::helper('sales')->__('Order Totals') ?></h4></div>
            <div id="order-totals" class="order-totals"><?php echo $this->getChildHtml('totals') ?></div>
        </div>
        <div class="clear"></div>
    </td>
</tr>
</table>
</div>
