- <h2>Order History</h2>
- <?php
- if(is_object($this->getOrderHistory()) && $this->getOrderHistory()->getSize() > 1): ?>
- <ul class="order-history">
- <?php foreach($this->getOrderHistory() as $order): ?>
- <li>Order number: #<?php echo $order->getIncrementId(); ?> Date: <?php echo $this->formatDate($order->getCreatedAt(),Mage_Core_Model_Locale::FORMAT_TYPE_FULL); ?>
- <table class="data-table">
- <thead>
- <tr>
- <th><?php echo $this->__('Code'); ?></th>
- <th><?php echo $this->__('Product'); ?></th>
- <th><?php echo $this->__('Price'); ?> (£)</th>
- <th><?php echo $this->__('Volume'); ?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($order->getAllVisibleItems() as $item): ?>
- <tr><td><?php echo $item->getSku(); ?></td><td><?php echo $this->stripTags($item->getName(), null, true); ?></td><td><?php echo Mage::getModel('directory/currency')->format($item->getData('price'), array('display'=>Zend_Currency::NO_SYMBOL), false); ?></td><td><?php echo ceil($item->getData('qty_ordered')); ?></td></tr>
- <?php endforeach; ?>
- </tbody>
- <tfoot>
- <tr>
- <td colspan="4" class="a-right">
- <?php $totals = Mage::getModel('sales/quote')->load($order->getQuoteId())->getTotals();
- foreach($totals as $total): ?>
- <?php echo $total->getTitle(); ?>: <b><?php echo Mage::helper('core')->currency($total->getValue(),true,false) ?></b>
- <?php endforeach; ?>
- </td>
- </tr>
- </tfoot>
- </table>
- <div class="shipping-details">
- <p class="shipping-address"><?php $shipping = $order->getShippingAddress();
- foreach($shipping->getStreet() as $street): ?>
- <?php echo $street; ?><br />
- <?php endforeach; ?>
- <?php echo $shipping->getCity(); ?><br />
- <?php echo $shipping->getRegion(); ?><br />
- <?php echo $shipping->getPostcode(); ?><br />
- </p>
- <?php if($order->getStatus() == Mage_Sales_Model_Order::STATE_COMPLETE): ?>
- <p>
- <b><?php echo $this->__('On'); ?></b>: <?php echo $this->formatDate($order->getUpdatedAt(),Mage_Core_Model_Locale::FORMAT_TYPE_FULL); ?>
- </p>
- <?php endif; ?>
- <p>
- <b><?php echo $this->__('Ordered by')?></b>: <?php echo $shipping->getFirstname(); ?> <?php echo $shipping->getLastname(); ?>
- </p>
- </div>
- </li>
- <?php endforeach; ?>
- </ul>
- <?php else: ?>
- <p class="notice">You have not made any orders yet.</p>
- <?php endif; ?>