{embed="store_example/_header"}

{exp:store:orders order_hash="{segment_3}"}

	{if no_orders}
		{redirect="404"}
	{/if}

	<ul class="breadcrumb">
		<li><a href="{path='store_example'}">Example Store</a> <span class="divider">&raquo;</span></li>
		<li><a href="{path='store_example/my_orders'}">My Orders</a> <span class="divider">&raquo;</span></li>
		<li class="active">Order #{order_id}</li>
	</ul>

	<div class="page-header">
		<h1>Order Summary / Tax Invoice <small>your order is complete!</small></h1>
	</div>

	<div class="row">
		<div class="span4">
			<fieldset>
				<legend>Summary</legend>
				<div class="control-group">
					<b>Order ID:</b> {order_id}<br />
					<b>Date:</b> {order_date format="%j %M %Y"}<br />
					<b>Status:</b> {order_status}<br />
					<b>Total:</b> {order_total}<br />
					<b>Paid:</b> {if is_order_paid}Yes{if:else}No{/if}
				</div>
			</fieldset>
		</div>
		<div class="span4">
			<fieldset>
				<legend>Billing Details</legend>
				<div class="control-group">
					<div><b>{billing_name}</b></div>
					<div>{billing_address1}</div>
					<div>{billing_address2}</div>
					<div>{billing_address3} {billing_postcode}</div>
					<div>{billing_region_name}</div>
					<div>{billing_country_name}</div>
					<div>{billing_phone}</div>
					<div>{order_email}</div>
				</div>
			</fieldset>
		</div>
		<div class="span4">
			<fieldset>
				<legend>Shipping Details</legend>
				<div class="control-group">
					{if shipping_same_as_billing}
						Same as Billing Details
					{if:else}
						<div><b>{shipping_name}</b></div>
						<div>{shipping_address1}</div>
						<div>{shipping_address2}</div>
						<div>{shipping_address3} {shipping_postcode}</div>
						<div>{shipping_region_name}</div>
						<div>{shipping_country_name}</div>
						<div>{shipping_phone}</div>
					{/if}
				</div>
			</fieldset>
		</div>
	</div>

	<table class="table">
		<thead>
			<tr>
				<th style="width:60%">Product</th>
				<th style="text-align:right">Price</th>
				<th style="text-align:center">Qty</th>
				<th style="text-align:right">Total</th>
			</tr>
		</thead>
		<tbody>
			{items}
				<tr>
					<td>
						<h4><a href="{path='store_example/product'}/{url_title}">{title}</a></h4>
						<p><small>
							<b>SKU:</b> {sku}<br />
							{modifiers}
								<b>{modifier_name}</b>: {modifier_value} {if price_mod_val}({price_mod}){/if}<br />
							{/modifiers}
						</small></p>
					</td>
					<td style="text-align:right">{price}</td>
					<td style="text-align:center">{item_qty}</td>
					<td style="text-align:right">{item_subtotal}</td>
				</tr>
			{/items}
			<tr>
				<th colspan="3">Subtotal</th>
				<th style="text-align:right">{order_subtotal}</th>
			</tr>
			{if order_shipping_val}
				<tr>
					<td colspan="3">Shipping</td>
					<td style="text-align:right">{order_shipping}</td>
				</tr>
			{/if}
			{if order_tax_val}
				<tr>
					<td colspan="3">{tax_name} ({tax_percent}%)</td>
					<td style="text-align:right">{order_tax}</td>
				</tr>
			{/if}
			<tr>
				<th colspan="3">Total</th>
				<th style="text-align:right">{order_total}</th>
			</tr>
		</tbody>
	</table>

{/exp:store:orders}

{embed="store_example/_footer"}
