View Single Post
  #1  
Old 03-11-2008, 05:47 PM
 
sunny sunny is offline
 

Advanced Member
  
Join Date: Mar 2005
Location: Lakewood, Colorado
Posts: 38
 

Default category list 4.1.9

Hello,

I'm currently upgrading a cart from 4.0.19 to 4.1.9. The older version has a flyout menu for the categories. This is an accumulation of a couple of different codes. It uses a variation of meniu.tpl from http://forum.x-cart.com/showthread.php?t=24388&highlight=category+css+list . The code is

Code:
{* $Id: categories.tpl,v 1.23 2007/05/12 09:53:29 max Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"} {else} {if $config.General.root_categories eq "Y"} <div id="sidemenu"> <ul> {*** level 1***} {section name=l1_cat_num loop=$allcategories} {if $allcategories[l1_cat_num].parentid eq 0} <li><a href="home.php?cat={$allcategories[l1_cat_num].categoryid}" title="{$allcategories[l1_cat_num].category}">{$allcategories[l1_cat_num].category} {*** count products***} {*{if $allcategories[l1_cat_num].product_count gt 0} ({$allcategories[l1_cat_num].product_count}) {/if}*} {if $allcategories[l1_cat_num].subcategory_count gt 0}{* ╩ *} {/if} <!--[if IE 7]><!--></a><!--<![endif]--> {if $allcategories[l1_cat_num].subcategory_count gt 0} {*** check if root cat has child cats ***} {*** end level 1***} {*** level 2***} <ul> {section name=l2_cat_num loop=$allcategories} {if $allcategories[l2_cat_num].parentid eq $allcategories[l1_cat_num].categoryid} <li><a href="home.php?cat={$allcategories[l2_cat_num].categoryid}" title="{$allcategories[l2_cat_num].category}">{$allcategories[l2_cat_num].category} {*** count products***} {*{if $allcategories[l2_cat_num].product_count gt 0} ({$allcategories[l2_cat_num].product_count}) {/if}*} {if $allcategories[l2_cat_num].subcategory_count gt 0}{* ╩ *}{/if}<!--[if IE 7]><!--></a><!--<![endif]--> {if $allcategories[l2_cat_num].subcategory_count gt 0} {*** check if parent has child cats***} {*** end level 2***} {*** level 3***} <ul> {section name=l3_cat_num loop=$allcategories} {if $allcategories[l3_cat_num].parentid eq $allcategories[l2_cat_num].categoryid} <li><a href="home.php?cat={$allcategories[l3_cat_num].categoryid}" title="{$allcategories[l3_cat_num].category}">{$allcategories[l3_cat_num].category} {*** count products***} {*{if $allcategories[l3_cat_num].product_count gt 0} ({$allcategories[l3_cat_num].product_count}) {/if}*} {if $allcategories[l3_cat_num].subcategory_count gt 0}{* ╩ *}{/if}<!--[if IE 7]><!--></a><!--<![endif]--> {if $allcategories[l3_cat_num].subcategory_count gt 0} {*** check if parent has child cats***} {*** end level 3***} {*** level 4***} <ul> {section name=l4_cat_num loop=$allcategories} {if $allcategories[l4_cat_num].parentid eq $allcategories[l3_cat_num].categoryid} <li><a href="home.php?cat={$allcategories[l4_cat_num].categoryid}" title="{$allcategories[l4_cat_num].category}">{$allcategories[l4_cat_num].category} {*** count products***} {*{if $allcategories[l4_cat_num].product_count gt 0} ({$allcategories[l4_cat_num].product_count}) {/if}*}<!--[if IE 7]><!--></a><!--<![endif]--> {/if}{/section} </li> </ul> {*** end level 4***} <!--[if lte IE 6]></a><![endif]--> {/if}{/if}{/section}</li> </ul> <!--[if lte IE 6]></a><![endif]--> {/if}{/if}{/section}</li> </ul> <!--[if lte IE 6]></a><![endif]--> {/if}{/if}{/section}</li> </ul> </div> {/if} {/if} {/capture} { include file="menu_rev.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories_rev menu_content=$smarty.capture.menu }

There is enough difference in how the code calls the categories and subcategories between the two versions that this is no longer working. I have figured out how to access the main category level but cannot access the subcategories.

Any thoughts on how to change accessing the subcategories?

Any help is greatly appreciated.

Carol Davenport
__________________
4.1.9
Reply With Quote