View Single Post
  #1  
Old 09-30-2003, 08:54 AM
 
info@sjidesign.com info@sjidesign.com is offline
 

Advanced Member
  
Join Date: Aug 2003
Posts: 46
 

Default Recommended products in a dropdown code 99% working :-)

Just about.

I've changed the recommends.tpl to the following code:

{* $Id: recommends.tpl,v 1.3 2003/03/05 08:19:11 svowl Exp $ *}
{if $recommends}
{capture name=recommends}
{section name=num loop=$recommends}
<option value="product.php?productid={$recommends[num].productid}">
<span class="ItemsList">{$recommends[num].product}</span>
</option>
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"}
{/if}

<form method=GET>
<select name="num[{$recommends}]" onchange="window.open(this.options[this.selectedIndex].value,'self')">{section name=option}
<option value={$smarty.capture.recommends}>{$recommends[option].option}</option>{/section}
</select>
</form>

But I get the products listed twice, once in a dropdown which I want and once in the standard X-Cart list, anyone know how to get rid of the first lot? I suppose I need to add the form part around the first lost of code somehow.

Dan
Reply With Quote