	{{* 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}}
	{{assign var=MethodID value=$CartDataItem.Collection_133_19}}
	{{getCollectionByCategory CollectionID=$CartDetailsCollection ColumnID=1 Value=$CartID var=CartDetails OrderColumn='ID'}}
	
	{{if $CartDetails|@count eq 0 or $CartData|@count eq 0 or $MethodID lt 1}}
		{{redirect page='/shopping-cart.html?m='|concat:$MethodID}}	
	{{/if}}
	{{getCollectionByCategory CollectionID=$CartDetailsCollection ColumnID=1 Value=$CartID var=CartDetailsWithCollection OrderColumn='ID' aditionalFilter=' Collection_'|concat:$CartDetailsCollection|concat:'_9 > 0  ' }}
	{{assign var=FormsToDisplay value=0}}
	{{if $CartDetailsWithCollection|@count gt 0}}
			{{foreach from=$CartDetailsWithCollection item=v key=k}}
					{{if $FormsToDisplay eq 0}}
						{{getCollectionByCategory CollectionID=$v.Collection_134_9 ColumnID=1 Value=$v.Collection_134_ID var=CartAdDetails OrderColumn='ID'}}
						{{if $CartAdDetails|@count lt $v.Collection_134_3}}
							{{assign var=ShoppingCartItemID value=$v.Collection_134_ID}}
							{{assign var=FormsToDisplay value=$v.Collection_134_9}}
							{{math equation="y - x" x=$CartAdDetails|@count y=$v.Collection_134_3 assign=times}}
						{{/if}}
					{{/if}}	
			{{/foreach}}
	{{/if}}
	
	{{if $FormsToDisplay eq 0}}
		{{redirect page='/checkout/personal-information.html'}}
	{{else}}
		
<div id="contenttop">
<div id="contenttext">
<h1>Additional Information</h1>
</div>
<div id="contentimage"><img alt="" src="/images/contentimage.jpg" /></div>
</div>
<div id="content">
{{if $CartData|@count gt 0 and $CartDetails|@count gt 0}}
		<div id="shopping_cart_details">
		{{getcontent id=55}}
		</div>
{{/if}}

{{getCollectionByCategory CollectionID=4 ColumnID='ID' Value=$FormsToDisplay var=CartAdDetailsNames OrderColumn='ID'}}
{{assign var=CartAdDetailsName value=$CartAdDetailsNames[0]}}	
<h1>{{$CartAdDetailsName.Collection_4_1}}</h1>

<h3>Form needs to be filled {{if $times eq 1}}one time{{else}}{{$times}} times{{/if}}</h3>

{{ViewCollection mode='Add' CollectionID=$FormsToDisplay}}
		
</div>
	{{/if}}
	
	