Hi,
I'm on X-Cart 4.0.12.
I'm trying to get the categories.tpl menu to show all subcategories below the main category.
I've worked out that I am not using the official 4.0.12 categories.tpl because the code is different and I suspect it's because it was an upgrade that Qualiteam did from an earlier store. If it ain't broke, don't fix it!
Anyway, by reading through the various hacks I've come up with this in my categories.tpl code, which displays the subcategories for the main category you happen to be in. However, I actually want it to display all subcategories under the main categories all the time.
Quote:
{section name=cat_num loop=$categories}
<font class=CategoriesList><a href="home.php?cat={ $categories[cat_num].categoryid }" class=VertMenuItems>{$categories[cat_num].category}</a></font>
{if $cat eq $categories[cat_num].categoryid || $current_category.parentid eq $categories[cat_num].categoryid}
{section name=subcat_num loop=$subcategories}
<font class=CategoriesList><a href="home.php?cat={ $subcategories[subcat_num].categoryid }"> { $subcategories[subcat_num].category|escape }</a></font>
{/section}
{/if}
{/section}
|
I'm having a hell of a time getting this to happen as I've been trying in vain to use this type of code from other hacks for my version:
Quote:
{section name=subcat loop=$allcategories}
{if $allcategories[subcat].parentid eq $categories[cat_num].categoryid}
{$allcategories[subcat].category}
{/if}
{/section}
|
but all I seem to get is a not hyperlinked list of categories. Can anyone help?
Thanks
Dan