View Single Post
  #15  
Old 01-18-2009, 02:22 PM
 
cbostard cbostard is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: USA/ New Jersey
Posts: 47
 

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

i tried to combine post #6 and products_t.tpl and put it in products.tpl , im on version 4.1.11 and got it to work pretty good but it needs some product name and sku realigning I will paste code below and if anyone can help refine this please add toit in here

Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<div class="product_records_container" style="margin-bottom: 2px; border #474747 ">
<table cellspacing="0" cellpadding="0" width="620" border="5">
<tbody>
<tr>
<td>
<table width="100%" cellpadding="5" cellspacing="1">
{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}
{section name=product loop=$products}
{assign var="discount" value=0}
<td>
<table id="ctl00_cpContentArea_dlProductRecords" style="border-collapse: collapse;" cellspacing="1px" cellpadding="3px">
<tbody>
<tr>
<td valign="top">
<div class="prod_box">
<a href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}" class="ProductTitle">{$products[product].product}</a><br />
{if $config.Appearance.display_productcode_in_list eq "Y" and $products[product].productcode ne ""}
{$lng.lbl_sku}: {$products[product].productcode}<br />
{/if}
<table cellpadding="3" cellspacing="0" width="100%">
<a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_p age}">
{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].use_special_price ne ""}
{include file="modules/Special_Offers/customer/product_special_price.tpl" product=$products[product]}
{/if}
<p <font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</font><br /><font class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</font>{if $discount gt 0}{if $config.General.alter_currency_symbol ne ""},{/if} {$lng.lbl_save_price} {$discount}%{/if}
{if $products[product].taxes}<br />{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes is_subtax=true}{/if}
</p>
</div></td>
</tr>
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"}
{include file="customer/main/buy_now.tpl" product=$products[product]}
{/if}
</tbody>
</table>
</td>

{if ($smarty.section.product.iteration is div by 4) and not ($smarty.section.product.last)}</tr><tr>{/if}

{/section}
{if $cell_counter lt $config.Appearance.products_per_row}
{section name=rest_cells loop=$config.Appearance.products_per_row start=$cell_counter}
<td class="SectionBox"> </td>
{/section}
</tr>
{/if}
</table>
</td>
</tr>
</table>
{if $active_modules.Feature_Comparison ne '' && $products && $printable ne 'Y' && $products_has_fclasses && $js_enabled}
{include file="modules/Feature_Comparison/compare_selected_button.tpl"}
{/if}
__________________
Version 4.3.1
fancy catagories (enabled)
dynamic image generator 4.1(enabled)
tabbed menu buttons
Cdseo Pro (enabled)
anonymous cart mod (enabled )
skin swap "mod doesnt work well for me"
x-magnafier
xcart Gift registry
Reply With Quote