View Single Post
  #1  
Old 09-23-2006, 05:41 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

Hi guys,

Can someone please point me to the right direction on how to modify the "bestsellers.tpl" template so it would call the product thumbnail images using the filesystem instead of database via "image.php" file.

Thanks
-Tuan



Current codes from "bestsellers.tpl" template file.
Code:
{* $Id: bestsellers.tpl,v 1.8 2005/11/21 12:42:00 max Exp $ *} {if $bestsellers} {capture name=bestsellers} <table cellpadding="0" cellspacing="3"> {foreach from=$bestsellers item=bestseller} <tr> {if $config.Bestsellers.bestsellers_thumbnails eq "Y"} <td width="30"> <a href="product.php?productid={$bestseller.productid}&cat={$cat}&bestseller"> <A href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}"> {include file="product_thumbnail.tpl" productid=$bestseller.productid image_x=50 product=$bestseller.product} </a> </td> {/if} <td> <font class="ProductPriceBestSellers"> <b><a href="product.php?productid={$bestseller.productid}&amp;cat={$cat}&amp;bestseller">{$bestseller.product}</a></b><br /> {$lng.lbl_our_price}: {include file="currency.tpl" value=$bestseller.price}<br /> </font> </td> </tr> {/foreach} </table> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_bestsellers menu_content=$smarty.capture.bestsellers } {/if}





The same can be said for the "Recommended Products" modules as well. It call all the images via the database using "image.php" file. It needs to be revised too.


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=80 product=$recommends[num].product tmbn_url=$recommends[num].tmbn_url} <br /> <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