{{assign var=ColectionID value=30}}
{{assign var=ProductsColectionID value=29}}
{{assign var=PricesColectionID value=31}}
{{assign var=CatProdXref value=32}} 
{{getCollectionByCategory ColumnID='7' Value='on' Collection_29_8='on' CollectionID=$ProductsColectionID OrderColumn='ID' var=RightProducts}} 
{{if $RightProducts|@count eq 0}} 
{{else}} 
<script type="text/javascript">
function addToCart(prodid)
{
var qty = document.getElementById('q_'+prodid).value;
var pid = document.getElementById('p_'+prodid).options[document.getElementById('p_'+prodid).selectedIndex].value;
window.location='/addproduct.html?prodid='+prodid+'&quantity='+qty+'&price='+pid+'&page=shopping-cart.html'
}

</script>	
<div id="right_products" class="box">
<center>
<h3>You may also consider buying</h3>
</center>

			{{assign var=ProdPrefix value='Collection_'}} {{assign var=ProdPrefix value=$ProdPrefix|concat:$ProductsColectionID|concat:'_'}} {{assign var='ProductID' value=$ProdPrefix|concat:'ID'}} {{assign var='ProductName' value=$ProdPrefix|concat:'1'}} {{assign var='ShortDesc' value=$ProdPrefix|concat:'2'}} {{assign var='SmallImage' value=$ProdPrefix|concat:'5'}} {{assign var=PricePrefix value='Collection_'}} {{assign var=PricePrefix value=$PricePrefix|concat:$PricesColectionID|concat:'_'}} {{assign var='PriceID' value=$PricePrefix|concat:'ID'}} {{assign var='PriceName' value=$PricePrefix|concat:'2'}} {{assign var='Price' value=$PricePrefix|concat:'3'}} {{assign var='ItemDesc' value=$PricePrefix|concat:'4'}} {{assign var='PriceImage' value=$PricePrefix|concat:'5'}} 
			<table cellpadding="2" cellspacing="2" border="0" width="190">
			{{foreach from=$RightProducts item=v key=k name=plist}}
			<tr valign="top">
			<td width="190">
			
            		<div style="padding:2px 2px 2px 2px; margin-bottom:2px; ">
						<center>
						<div><img id="image_{{$v.$ProductID}}" height="113" alt="" src="{{$v.$SmallImage}}" width="151" border="0" /></div>
						<strong>{{$v.$ProductName}}</strong></center>
						<br/>
									{{getCollectionByCategory ColumnID='1' Value=$v.$ProductID CollectionID=$PricesColectionID OrderColumn='ID' var=Prices}}
									{{if $Prices|@count gt 1}}
										<select name="p_{{$v.$ProductID}}" id="p_{{$v.$ProductID}}" class="selectbox" onChange="makeChanges(this , {{$v.$ProductID}})">
										{{foreach from=$Prices item=vv key=kk}}
										<option value="{{$vv.$PriceID}}" img="{{if $vv.$PriceImage neq ''}}{{$vv.$PriceImage}}{{/if}}">{{$vv.$PriceName}}  ${{$vv.$Price|string_format:'%.2f'}}</option>
										{{/foreach}}
										</select>   
										<input size="2" name="q_{{$v.$ProductID}}" id="q_{{$v.$ProductID}}" value="1" />
										 
										<a href="javascript: void(0);" onclick="addToCart({{$v.$ProductID}});">Add To Cart</a>
									{{else}}
										{{assign var=vv value=$Prices[0]}}
						 {{if $vv.$PriceName neq ''}}<p>{{$vv.$PriceName}}</p>{{/if}}
						 ${{$vv.$Price|string_format:'%.2f'}}

						{{if $vv.$PriceImage neq ''}} <font class="designPick" onmouseover="this.style.cursor='hand'" style="CURSOR: hand" onclick="document.getElementById('image_{{$v.$ProductID}}').src='{{$vv.$PriceImage}}'">{{$vv.$PriceName}} </font>{{else}} {{$vv.$PriceName}} {{/if}}
						<br/>
						<input size="2" name="q_{{$v.$ProductID}}" id="q_{{$v.$ProductID}}" value="1" /> 
						<a onclick="javascript: void(0);" href="javascript: window.location='/addproduct.html?prodid={{$v.$ProductID}}&quantity='+document.getElementById('q_{{$v.$ProductID}}').value+'&price={{$vv.$PriceID}}&page=shopping-cart.html'">Add To Cart</a>
						{{/if}}									
						</div>
            <hr noshade size="1"/>
			</td>
			</tr>
			{{/foreach}} 
			
			</table>
</div>
{{/if}}