View Single Post
  #22  
Old 07-16-2005, 08:44 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Just a little update on this thread. Here's the code for 4.x that breaks the display up into rows of 3, allowing as many recommended products as you want (as set in General Settings/Modules Options). Just change the thumbnail width as you would like (in pixels). You can also adjust the number of columns by changing the width of the td and the 'div by x' where x is the number of columns:

Code:
{if $recommends} {capture name=recommends} {section name=num loop=$recommends} { if %num.first% } <table border=0 width=100%>{/if} { if %num.index% is div by 3}<tr>{/if} <td width="33%" align="center" valign="top"> <a href=product.php?productid={$recommends[num].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=100 product=$recommends[num].product tmbn_url=$recommends[num].tmbn_url} <SPAN class="ItemsList">{$recommends[num].product}</SPAN> </td> { if %num.last% }</tr> </table>{/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"} {/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote