Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

List Categories AND Subcategories in categories.tpl....

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-13-2004, 08:06 AM
 
pipercub pipercub is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 82
 

Default List Categories AND Subcategories in categories.tpl....

By default x-cart will list the Main categories as normal such as:

Cat 1
Cat 2
Cat 3
Cat 4

However, I want the categories.tpl to show them as:

Cat 1
Sub 1A
Sub 1B
Cat 2
Sub 2A
Sub 2B
etc...

First, I unchecked the 'root categories' checkbox under General Settings. However, this just replaces the category meny with sub categories after you click on a parent caregory first. Furthermore, it only shows the subcategories of the Parent you clicked on.

Regardless of which category or sub category you click on, I want the menu to always show the entire category 'tree'. I did play around in the categories.tpl for a few hours and I got close a few times, but not exactly how I wanted to see it.

Now, I do know that there is a 'Fancy Categories" Add-On, but I really don't want all of the "interactivity" that it offers. I just want a palin and simple category "tree".

Has anyone done this to x-cart without "Fancy Categories"? Or, should I just buy the Add-On and try to mod it to reflect my goal?

Thanks,
Piper


v3.5.x
__________________
x-cart 3.4.4 (UNIX)
Reply With Quote
  #2  
Old 11-02-2004, 10:52 AM
 
jcaisse jcaisse is offline
 

Member
  
Join Date: Feb 2004
Posts: 21
 

Default

not sure if this will work for you .. but try this:

{if $config.General.root_categories eq "Y"}
<table cellspacing=0 cellpadding=1 border=0>
{foreach from=$categories item=v}
<tr>
<td width=1>[img]{$ImagesDir}/spacer.gif[/img]</td>
<td height=12>[img]../icon.php?categoryid={$v.categoryid}[/img]</td>
</tr>
{foreach from=$v.childs item=c}
<tr>
<td></td>
<td><font class=CategoriesList>{$c.category_name|escape}</font></td>
</tr>
{/foreach}
<tr>
<td colspan=2></td>
</tr>
{/foreach}
</table>
{/if}
__________________
Long time fan, not running any sites at the moment...
Reply With Quote
  #3  
Old 11-02-2004, 03:37 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

look in custom mods. youll find stuff like this in there
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:33 AM.

   

 
X-Cart forums © 2001-2020