По запросу "Категории на главной" есть такая тема и есть решение проблемы. Но можно написать еще раз:
В файл includes/home.php в конце перед ?> вставляем следующий код:
//get root categories to be shown in the front-end homepage
$q = db_query("SELECT categoryID, name, products_count, picture, hurl FROM ".CATEGORIES_TABLE." WHERE categoryID<>0 and parent='0' and enabled='1' ORDER BY products_count DESC") or die (db_error());
$root = array();
while ($row = db_fetch_row($q))
{
if (!file_exists("./products_pictures/$row[3]")) $row[3] = "";
if ($row[4] != "") {$row[4] = REDIRECT_CATALOG."/".$row[4];} else {$row[4] = "index.php?categoryID=".$row[0];}
$root[] = $row;
}
//get subcategories of root categories
$query = "SELECT categoryID FROM ".CATEGORIES_TABLE." WHERE categoryID<>0 ORDER BY categoryID ASC";
$result = array();
for ($i=0; $i<count($root); $i++)
{
$q = db_query("SELECT categoryID, name, products_count, parent, hurl FROM ".CATEGORIES_TABLE." WHERE categoryID<>0 and parent=".$root[$i][0]." and products_count>0 ORDER BY products_count DESC") or die (db_error());
while ($row = db_fetch_row($q))
{
if ($row[4] != "") {$row[4] = REDIRECT_CATALOG."/".$row[4];} else {$row[4] = "index.php?categoryID=".$row[0];}
$result[] = $row;
}
}
$smarty->assign("root_categories",$root);
$smarty->assign("root_categories_subs",$result);
В файл шаблона css/css_default-full/theme/home.tpl в конце после {$index} и перед </div> :
<h1>{$smarty.const.ADMIN_CATALOG}</h1>
<table width=100% border=0 cellpadding=5>
{section name=i loop=$root_categories}
{if $smarty.section.i.index is div by 2}<tr>{/if}
<td width=1% align=center>
{if $root_categories[i][3] ne ""}<a href="http://{$smarty.const.CONF_SHOP_URL}/{$root_categories[i][4]}" title="{$root_categories[i][1]}"><img border=0 src="./products_pictures/{$root_categories[i][3]}" alt="{$root_categories[i][1]}" />{/if}
</td>
<td>
<a href="http://{$smarty.const.CONF_SHOP_URL}/{$root_categories[i][4]}" title="{$root_categories[i][1]}">{$root_categories[i][1]}</a> [{$root_categories[i][2]}]:<br /><br />
{* show sub categories *}
{assign var="tmp" value=0}
{section name=j loop=$root_categories_subs}
{if $root_categories_subs[j][3] == $root_categories[i][0]}
{if $tmp == 1}|
{else}
{assign var="tmp" value=1}
{/if}
<a href="http://{$smarty.const.CONF_SHOP_URL}/{$root_categories_subs[j][4]}" title="{$root_categories_subs[i][1]}"><span class="sub">{$root_categories_subs[j][1]}</span></a>
{/if}
{/section}
</td>
</td>
{if ($smarty.section.i.index+1) is div by 2}</tr>{/if}
{/section}
</table>