View Single Post
  #6  
Old 04-19-2008, 05:53 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default Re: how to get 4 products a row on products.tpl?

Hi again MOC I just cleaned up the code for you. As my app was coming out with all sorts of validation errors. Becareful with using a css id more than once on the same page (for example, id="ctl00_cpContentArea_dlProductRecords")

Code:
<div class="product_records_container" style="margin-bottom: 2px; border-bottom: #cccccc 1px dotted;"> <table cellspacing="0" cellpadding="0" width="585" border="0"> <tbody> <tr> {section name=product loop=$products} {assign var="discount" value=0} <td> <table id="ctl00_cpContentArea_dlProductRecords" style="border-collapse: collapse;" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="top"> <div class="prod_box"> <a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}"> {include file="product_thumbnail.tpl" productid=$products[product].productid image_x=130 image_y=130 product=$products[product].product tmbn_url=$products[product].tmbn_url}</a> {if $active_modules.special_offers ne "" and $products[product].have_offers} {include file="modules/special_offers/customer/product_offer_thumb.tpl" product=$products[product]} {/if} <img alt="" src="feature_exclusive.gif" /> <p><span class="prodname">{$products[product].product}</span></p> <p class="shortdescription">{$products[product].descr}</p> <p class="instock">--extrafield-shipping--<img src="star50.gif" alt="" /></p> <p class="prodprice">Our Price: {include file="currency.tpl" value=$products[product].price} ({include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price})</p></div></td> </tr> </tbody> </table> </td> {if ($smarty.section.product.iteration is div by 4) and not ($smarty.section.product.last)}</tr><tr>{/if} {/section} </tr> </tbody> </table> </div>

Just in case it helps, no ideas. I'm bored - I know ;D
__________________
Doms
kube v4.1.9
Reply With Quote