{{assign var=CartCollection				value=133}}
{{assign var=CartDetailsCollection		value=134}}
{{assign var=SessionID   		value=''|sessionid}}

{{getCollectionByCategory CollectionID=$CartCollection Collection_133_1=$SessionID aditionalFilter=' (Collection_133_5<>"on" or Collection_133_5 IS NULL) ' var=CartData OrderColumn='ID'}}
{{if $CartData|@count neq 0}}

	{{assign var=CartDataItem value=$CartData[0]}}
	{{assign var=CartID value=$CartDataItem.Collection_133_ID}}
	{{getCollectionByCategory CollectionID=$CartDetailsCollection ColumnID=1 Value=$CartID var=CartDetails OrderColumn='ID'}}
	{{assign var=CartDetailPrefix   	value='Collection_'}}
	{{assign var=CartDetailPrefix   	value=$CartDetailPrefix|concat:$CartDetailsCollection|concat:'_'}}
	{{assign var=CartDetailID 			value=$CartDetailPrefix|concat:'ID'}}
	{{assign var=CartDetailName 		value=$CartDetailPrefix|concat:'7'}}
	{{assign var=CartDetailProductID 	value=$CartDetailPrefix|concat:'2'}}
	{{assign var=CartDetailQuantity 	value=$CartDetailPrefix|concat:'3'}}
	{{assign var=CartDetailPriceID 		value=$CartDetailPrefix|concat:'4'}}
	{{assign var=CartDetailPrice 		value=$CartDetailPrefix|concat:'5'}}
	{{assign var=CartDetailPriceDesc 	value=$CartDetailPrefix|concat:'6'}}
	{{assign var=TotalCartPrice value=0}}
	{{if $CartDetails|@count gt 0}}
	<div id="cart_contents">
	<div class="box">
		<h3>Shopping Cart</h3>
		<table cellpadding="4" cellspacing="2" border="0" width="100%">
		<tr>
			<td><strong>Item</strong></td>
			<td><strong>Qty.</strong></td>
			<td><strong>Price</strong></td>
		</tr>
		{{foreach from =$CartDetails item=v key=k}}
		{{ShoppingCartPriceOptions ProductID=$v.$CartDetailProductID PriceID=$v.$CartDetailPriceID Price=$v.$CartDetailPrice Quantity=$v.$CartDetailQuantity ReturnVal=CartItemDetails}}
			<tr valign="top">
				<td>{{$v.$CartDetailName}} <br/> {{$v.$CartDetailPriceDesc}} {{if $CartItemDetails.Text neq ''}}<br/>{{$CartItemDetails.Text}}{{/if}}</td>
				<td>{{$v.$CartDetailQuantity}}</td>
				<td>${{$v.$CartDetailPrice|string_format:'%.2f'}}</td>
			</tr>
			<tr>
				<td colspan="3"><hr size="1" noshade color="#FFFFFF"/></td>
			</tr>
			{{math equation="x + y" x=$TotalCartPrice y=$CartItemDetails.Value format="%.2f" assign=TotalCartPrice}}
		{{/foreach}}
		<tr>
			<td><strong>Total:</strong></td>
			<td> </td>
			<td>
			<strong>${{$TotalCartPrice}}</strong>
			</td>
		</tr>
		<tr>
				<td colspan="3"><hr size="1" noshade color="#FFFFFF"/></td>
			</tr>
		</table>
		<center>
		<a href="/shopping-cart.html?page={{$smarty.server.REDIRECT_SCRIPT_URL}}"><strong>Edit Cart</strong></a>
		<img src="/images/sep.gif" height="5" width="10"/>
		<a href="/shopping-cart.html?page={{$smarty.server.REDIRECT_SCRIPT_URL}}"><strong>Checkout</strong></a>
		</center>
	</div>	
	<div ><img src="/images/sep.gif" height="5"/></div>
	</div>
		{{/if}}
	{{else}}
	{{*	
	<div class="box">
		<h3>Shopping Cart</h3>
		<p>Your shopping cart is empty</p>
	
	</div>	
	*}}	
{{/if}}