  <div class="my-account">
	<div class="heading clearfix">
    	<dl class="acctip">
        	<dt><?php echo $heading_title; ?></dt>
        </dl>
    </div>
    
    <div id="invoice">
      <div class="a">
        <table>
          <tr>
            <td class="order-reference"><b><?php echo $text_order; ?></b><br />
              <?php echo $reference; ?><br />
              <br />
              <b><?php echo $text_email; ?></b><br />
              <?php echo $email; ?><br />
             <br />
              <?php if ($shipping_method) { ?>
              <b><?php echo $text_shipping_method; ?></b><br />
              <?php echo $shipping_method; ?><br />
              <br />
              <?php } ?>
              <b><?php echo $text_payment_method; ?></b><br />
              <?php echo $payment_method; ?></td>
            <td class="shipping-address"><div style="padding-left:50px;"><?php if ($shipping_address) { ?>
              <b><?php echo $text_shipping_address; ?></b><br />
              <?php echo $shipping_address; ?><br />
              <?php } ?></div></td>
            <td class="billing-address"><div style="padding-left:50px;"><b><?php echo $text_payment_address; ?></b><br />
              <?php echo $payment_address; ?><br /></div></td>
          </tr>
        </table>
      </div>
        <table class="c highlight">
          <tr>
            <th class="center">Image</th>
            <th class="center hidden-xs" width="300"><?php echo $text_product; ?></th>
            <th class="center item-id">Item No.<!--<?php echo $text_model; ?>--></th>
            <th class="center"><?php echo $text_quantity; ?></th>
            <th class="center"><?php echo $text_price; ?></th>
            <th class="center"><?php echo $text_total; ?></th>
          </tr>
          <?php foreach ($products as $product) { ?>
          <tr>
            <td align="center"><a href="https://www.beststoreitems.com/index.php?controller=product&product_id=<?php echo $product['id']; ?>" target="_blank"><img src="<?php echo $product['thumb']?>"></a></td>
            <td class="left hidden-xs"><a target="_blank" style="color:#0000FF; text-decoration:underline;" href="https://www.beststoreitems.com/index.php?controller=product&product_id=<?php echo $product['id']; ?>"><?php echo $product['name']; ?></a>
              <?php foreach ($product['option'] as $option) { ?>
              <br />
              <small> - <?php echo $option['name']; ?> <?php echo $option['value']; ?></small>
              <?php } ?>
            </td>
            <td class="center item-id"><?php echo $product['id']; ?></td>
            <td class="center"><?php echo $product['quantity']; ?></td>
            <td class="center"><?php if (!$product['discount']) { ?>
              <?php echo $product['price']; ?>
              <?php } else { ?>
              <span class="price_old"><?php echo $product['price']; ?></span><br />
              <span class="price_new"><?php echo $product['discount']; ?></span>
              <?php } ?></td>
            <td class="center"><?php echo $product['total']; ?></td>
          </tr>
          <?php } ?>
        </table>
        <br />
        <div class="f clearfix" style="position:relative;">
          <table style="float:right;">
            <?php foreach ($totals as $total) { ?>
            <tr>
              <td class="right" colspan="4" style="padding-right:10px;"><?php echo $total['title']; ?></td>
              <td class="right"><?php echo $total['text']; ?></td>
            </tr>
            <?php } ?>
          </table>
        </div>
      <div class="d"><b><?php echo $text_order_history; ?></b></div>
      <div class="e">
        <table class="g">
          <tr>
            <th class="left" style="padding:3px 0 3px 10px;"><?php echo $column_date_added; ?></th>
            <th class="left"><?php echo $column_status; ?></th>
            <th class="left" width="50%"><?php echo $column_comment; ?></th>
          </tr>
          <?php foreach ($historys as $history) { ?>
          <tr>
            <td style="padding:3px 0 3px 10px;"><?php echo $history['date_added']; ?></td>
            <td><?php echo $history['status']; ?></td>
            <td><?php echo $history['comment']; ?></td>
          </tr>
          <?php } ?>
        </table>
      </div>
    </div>
    <div class="buttons" style="text-align:right;">
    	<a class="btn_button btn_gray" onclick="window.history.back(-1)" style="margin:0;"><i class="icon-back"></i>Back to Order List</a>
    </div>
</div>

