	{{* if we do not have a valid cart we will redirect to shopping-cart.html page *}}
	{{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'}}
	{{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'}}
	
	{{if $CartDetails|@count eq 0 or $CartData|@count eq 0 }}
		{{redirect page='/shopping-cart.html'}}	
	{{/if}}


<div id="middle2">



{{if $CartData|@count gt 0 and $CartDetails|@count gt 0}}
		<div id="shopping_cart_details">
		{{getcontent id=55}}
		</div>
	{{/if}}
	
	<h1>Your Shipping Information</h1>
	
	<div id="cartform">
		{{* We need to see if personal info has been completed once *}}
		{{* If yes we need to edit not add again *}}
		
		{{getCollectionByCategory CollectionID=139 Collection_139_1=$CartID var=SInfo OrderColumn='ID'}}
		{{if $SInfo|@count eq 0}}
			{{* if we add for the first time we could try to get the info from personal info *}}
			{{getCollectionByCategory CollectionID=138 Collection_138_1=$CartID var=PInfo OrderColumn='ID'}}
			{{if $PInfo|@count neq 0}}
				{{assign var=PinfoData value=$PInfo[0]}}
			{{/if}}
			
			{{ViewCollection mode='Add' CollectionID=139}}
		{{else}}
			{{assign var=SinfoData value=$SInfo[0]}}
			{{assign var=SinfoID value=$SinfoData.Collection_139_ID}}
			{{ViewCollection mode='Edit' rowid=$SinfoID CollectionID=139}}
		{{/if}}	
		</div>
</div>
