I don't recommend that code for subcategories.tpl. Use this instead (make a backup of your current subcategories.tpl first):
Code:
{capture name=dialog}
{if $current_category.description ne ""}
{$current_category.description}<br>{/if}
{assign var="tmp" value="0"}
{section name=cat_num loop=$subcategories}
{if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if}
{/section}
{section name=cat_num loop=$subcategories}
{ if %cat_num.first% }
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
{/if}
{ if %cat_num.index% is div by 3}
<tr>
{/if}
<td align="center" valign="top">
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
{if $subcategories[cat_num].icon_url}<img src="{$subcategories[cat_num].icon_url}" border="0" style="padding-bottom: 5px;">{else}<img src="{$xcart_web_dir}/default_icon.gif" border="0" style="padding-bottom: 5px;">{/if} </a><br>
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
<span class="SubcategoryName">{$subcategories[cat_num].category|escape }</span></a><br>
</td>
{ if %cat_num.last% }
</tr>
</table>
{/if}
{/section}
{if $tmp and $products ne "" }
{/if}
{if $products}
<br><hr size="1" noshade><br>
{if $sort_fields}
<DIV align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="home.php?cat=`$cat`&"}</DIV>
{/if}
{if $total_pages gt 2}
<br>
{ include file="customer/main/navigation.tpl" }
{/if}
{include file="customer/main/products.tpl" products=$products}
{/if}
{if $products eq "" and $tmp eq "0"}
{$lng.txt_no_products_in_cat}
{/if}
{/capture}
{include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"}
{if $f_products ne ""}
<br>
{include file="customer/main/featured.tpl"}
{/if}
{ include file="customer/main/navigation.tpl" }