Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

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

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #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
  #2  
Old 10-01-2003, 12:30 AM
 
info@sjidesign.com info@sjidesign.com is offline
 

Advanced Member
  
Join Date: Aug 2003
Posts: 46
 

Default

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
Reply With Quote
  #3  
Old 01-21-2004, 01:44 PM
 
krucz36 krucz36 is offline
 

Member
  
Join Date: Nov 2003
Posts: 16
 

Default

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!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:22 PM.

   

 
X-Cart forums © 2001-2020