View Single Post
  #3  
Old 02-15-2008, 02:29 PM
 
Chrisb Chrisb is offline
 

Member
  
Join Date: Jan 2008
Posts: 25
 

Default Re: Products under subcategories keeping existing layout

So I have the following code that prints out the subcategory the products name, the description but then it only displays the variables and price for the first product under every product instead of displaying the indiviual products variables. when I include the code: {section name=product loop=$products} it displays every products variable under every product. Can someone please help.

{if $subcategories }
<table width="100%" >
{foreach from=$subcategories item=subcat}
<tr>
<td class="ColumnTitles" valign="top">
<a href="home.php?cat={ $subcat.categoryid }">
<font class="ItemsList">{ $subcat.category|escape }</font></a>
</td>
</tr>
{foreach from=$subcat.products item=subproduct}
<tr>
<td class="ColumnTitles" valign="top">
<a href="product.php?productid={$subproduct.productid }&amp;cat={$subproduct.productid }&amp;cat={$cat}&amp;page={$navigation_page}">
{$subproduct.product|escape}</a>
</td>
</tr>
<tr>
<td>
{$subproduct.descr|truncate:100:"...":true}
</td>
</tr>
{foreach from=$products[product] item=products}
{section name=product }
</tr>
<td>
{include file="customer/main/buy_now.tpl" product=$products[product]}
</td>
</tr>
{/section}
{/foreach}
{/foreach}
{/foreach}
</table>
{/if}
__________________
www.easycoffee.com.au
Version 4.1.9
Reply With Quote