<p><b>Order Form</b><br />
	<?php echo $mail_body ?>
</p>
<p><b>Order information:</b><br />
Date : <?php echo date('Y/m/d H:i:s', time())?><br />
Currency : <?php echo $order_currencyCode?><br />
<br />
<table border="1">
	<thead>
		<tr><th width="80">ID</th><th>Name</th><th>Unit Price</th><th width="80">Quantity</th><th width="80">Subtotal</th></tr>
	</thead>
<tbody>
<?php
$templateItem = '<tr valign="top"><td align="center">{%id%}</td><td>{%name%}</td><td align="right">{%unitPrice%}</td><td align="center">{%qty%}</td><td align="center">{%subTotal%}</td></tr>';
$total = array(
	'qty' => 0,
	'amount' => 0,
);
$icount = count($order_productsList);
for($i = 0; $i < $icount; $i++)
{
	$item = $order_productsList[$i];
	$total['amount'] += $item['subTotal'] = $item['qty'] * $item['unitPrice'];
	$total['qty'] += $item['qty'];
	$row = str_replace(explode(',', '{%' . implode("%},{%", array_keys($item)) . '%}'), array_values($item), $templateItem);
	echo $row;
}
?>
<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
</tbody>
<tfoot>
	<tr><td>&nbsp;</td><td>Total</td><td>&nbsp;</td><td align="center"><?php echo $total['qty']?></td><td align="center"><?php echo $total['amount']?></td></tr>
</tfoot>
<?php
?>
</table>
<hr/>
