View Single Post
  #31  
Old 09-20-2006, 01:22 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Pictures in recommends.tpl for 3 column format

Just wanted to thank Balinor for the codes below. It works great as of version 4.1.3 YEAH!!!!!!

Just a quick question, how do I insert a simple line space so that the product title would drop down and be center under the product thumbnail? Here is how it currently looks.

http://www.mvpautoparts.com/shop/product.php?productid=17036&cat=0&page=1

Thanks again for all of your help.
-Tuan



Quote:
Originally Posted by balinor
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}
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote