X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Recommended products in a dropdown code 99% working :-) (https://forum.x-cart.com/showthread.php?t=4547)

info@sjidesign.com 09-30-2003 08:54 AM

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

info@sjidesign.com 10-01-2003 12:30 AM

Seems to work if you get rid of the line saying

{include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"}

Dan

krucz36 01-21-2004 01:44 PM

great piece of work there. got it on the first try, and the kind of newbie I am, that's sayin' something

there is one tiny little gripe, tho...any way to put a value in there to describe the list? like "related products" or "additional items" or "you might like...", that kind of thing?

thanks!


All times are GMT -8. The time now is 05:52 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.