View Single Post
  #27  
Old 07-24-2003, 08:24 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Compare it with mine. Mine works perfect for my needs, but is a little more simplified than yours.

Code:
{* $Id: products.tpl,v 1.21 2002/11/19 12:57:48 alfiya Exp $ and amended further by funkydunk.netand ADPBoss*} <table width=100% border=0 cellpadding=0 cellspacing=0> {section name=product loop=$products} {if $smarty.section.product.index is div by $config.General.products_per_row} <tr valign="top"> {/if} <td valign="top"> <table width=100% border=0 cellpadding=3 cellspacing=0> <tr> <td width=100 rowspan="2" align=left valign=top> <div align="center"><a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=100 product=$products[product].product}</a> {if $products[product].avail le 0}<font color="#FF0000" size="3">Sold Out!</font>{/if} </div></td> <td valign=top width=90%> {$products[product].product|escape}</font> {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].price ne 0} {if $products[product].discount ne 0} <font class=MarketPrice>{$lng.lbl_market_price}: <s> {math equation="price/(1-(discount/100))" price=$products[product].price discount=$products[product].discount format="%d.00" assign=unformatted}{include file="currency.tpl" value=$unformatted} </s></font> {/if} <font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].discount ne 0}, save {$products[product].discount}%{/if}{if $config.General.use_vat eq "Y"}, including VAT {$products[product].vat}%{/if} {else} <font class=ProductPrice>{$lng.lbl_enter_your_price}</font> {/if} {/if} </td> </tr> <tr> <td valign=top> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr valign="top"> <td><a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>{include file="buttons/details1.tpl"}</a></td> </tr> {if $products[product].avail gt 0} <tr valign="top"> <td><form name=orderform_{%product.index%} method=post action="cart.php?mode=add"> <a href="javascript: document.orderform_{%product.index%}.submit()"> {include file="buttons/add_to_cart1.tpl"}</a> <input type=hidden name=amount value=1> <input type=hidden name=mode value=add> <input type=hidden name=productid value="{$products[product].productid}"> <input type=hidden name=cat value="{$smarty.get.cat}"> <input type=hidden name=page value="{$smarty.get.page}"> </form></td></tr> {else}<tar valign="top"><td></td></tr>{/if} </table></td> </tr> </table> </td> {/section} </tr> </table>

Visit http://www.adpmods.com/xcart to preview how it looks and works. NOTE: I do have some fancy inventory stuff going on with displaying out of stock conditions. Unless you desire the same effect, DO NOT copy my code verbatim.

Good Luck!
Reply With Quote