{assign var="hideWidgets" value=""}
{include_php file="shared_handle:cart"}

<h1 class="underline">My Shopping Cart</h1>
<p>Below is a list of your selected shopping cart products, you can update the quantities for each item, or continue on to the check out page.</p>
<form name="cartUpdate" method="post" action="index.php" style="margin:0px;">
<input type="hidden" name="pg" value="{$page.name}">
<input type="hidden" name="no_expire" value="true">

<table width="525" cellpadding="0" cellspacing="0" align="center">
<tr>
	<td class="underline2"><b>Product</b></td>
	<td class="underline2" align="right"><b>Price</b></td>
	<td class="underline2" align="right"><b>Quantity</b></td>
	<td class="underline2" align="right"><b>Subtotal</b></td>
</tr>
{foreach from=$cart.items key="productCode" item="lineItem" name="items"}
	{if $smarty.foreach.items.iteration eq $cart.items|@count}{assign var="underline" value=" class=\"underline2\""}{/if}
<tr>
	<td{$underline} nowrap="nowrap">{$lineItem.title}</td>
	<td{$underline} align="right">${$lineItem.each|number_format:"2"}</td>
	<td{$underline} align="right"><input type="text" name="qty[{$productCode}]" size="2" value="{$lineItem.quantity}" /></td>
	<td{$underline} align="right">${$lineItem.subtotal|number_format:"2"}</td>
</tr>
{foreachelse}
<tr>
	<td colspan="4" align="center" class="underline2">You have no items in your shopping cart.</td>
</tr>
{/foreach}
<tr>
	<td colspan="3" align="left"><b>Product(s) total:</b></td>
	<td align="right"><b>${$cart.total|number_format:"2"}</b></td>
</tr>
</table>

<br />
<div class="hBox" style="text-align:right;">
	<a href="?pg=my_store" class="button">Continue Shopping</a>
	{if $cart.items|@count gt 0}
	<a href="javascript://" onclick="document.cartUpdate.submit(); return false;" class="button">Update Quantities</a>
	<a href="?pg=cart/checkout" class="button">Check Out Now</a>
	{/if}
</div>
</form>