X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Categories Help (https://forum.x-cart.com/showthread.php?t=30137)

McMaster 03-31-2007 12:22 PM

Nested Categories in Menu Help - Hints would help greatly
 
I need help understanding the relationships in Xcart to better figure out how to get the following to work.

Default

Categories <header>
Men's Coats<link to category>
Men's Jackets<" ">
Men's Shirts<" ">
Men's Pants<" ">
Men's Socks<" ">
Women's Coats<" ">
Women's Jackets<" ">
Women's Shirts<" ">
Women's Pants<" ">
Women's Socks<" ">

So as you can see the categories look a little silly. Since the products categories are often repeats but gender specific I was hoping there was a way to do this:

Categories <header>
Men's<link to category>
<Tab>Coats<subcategory>
<Tab>Jackets<subcategory>
<Tab>Shirts<subcategory>
<Tab>Pants<subcategory>
<Tab>Socks<subcategory>
Women's<link to category>
<Tab>Coats<subcategory>
<Tab>Jackets<subcategory>
<Tab>Shirts<subcategory>
<Tab>Pants<subcategory>
<Tab>Socks<subcategory>

If I can get the subcategories in there as nested categories on the menu that would work :) Any help?

McMaster 04-02-2007 09:45 AM

Re: Categories Help
 
I will bump only once due to adding more info in case that was the issue... I know its not a simple question

McMaster 04-02-2007 04:22 PM

Re: Categories Help
 
Well after surfing for a while I was able to gleen this from the forums. I guess few people call it nested menu categories like I do, random word searching did the trick.

edited skin1/customer/categories.tpl

Quote:


{* $Id: categories.tpl,v 1.23 2004/06/24 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"}
{section name=cat_num loop=$categories}
<FONT class="VertMenuItemsTitle">{$categories[cat_num].category}</FONT><br>
{section name=sub_num loop=$allcategories}
{if $allcategories[sub_num].parentid == $categories[cat_num].categoryid}<br>
<A href="home.php?cat={$subcategories[cat_num].categoryid}" class="VertMenuItems">{$allcategories[sub_num].category}
{/if}
{/section}
<HR size="1" class="VertMenuHr">
{/section}
{else} {section name=cat_num loop=$subcategories}
{$subcategories[cat_num].category}
{/section}
{/if}
{/if}
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }


So the only problem is... if I take the main category link off then the bottom subcategory link area extends to the next link area and over top the main category of the next section.

Example:

Main1 -not a link
sub1 - linked
sub2 - linked
sub3 --|
---------| linked area for sub3
Main2--|
sub1 - linked

If I link both main and subcategories I get:

Main1 - linked
sub1 - linked
sub2 - linked
sub3 - linked
{dead space}
Main2- linked
sub1 - linked

Anyone have any ideas?


All times are GMT -8. The time now is 08:16 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.