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

Categories Menu - Showing Subcategories

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #81  
Old 05-18-2006, 06:25 PM
 
idesign123 idesign123 is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 58
 

Default

:: squinting ::

I see it now - thanks!
__________________
version 4.0.18 (+ several cool mods)
Reply With Quote
  #82  
Old 05-19-2006, 05:39 PM
 
alphastara alphastara is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 39
 

Default

Thank you for the great feedback on the mod. I will sit down and try and make a *cleaner* version of it, maybe even the option to enable/disable it through admin....if anyone wants to help or make suggestions let me know.

Alphastara
www.alphastara.com.au
X-Cart 4.0.18 - Live
__________________
Alphastara | New Age Products
www.alphastara.com.au
V: 4.1.6 + AOM
Reply With Quote
  #83  
Old 05-21-2006, 01:54 AM
 
SinCabeza SinCabeza is offline
 

Member
  
Join Date: May 2006
Posts: 25
 

Default Re: 3 Levels!

Code:
{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} {assign var=topmostcat value=$current_category.categoryid_path|regex_replace:"/\/.*/":""} {if $cat eq $categories[cat_num].categoryid || $current_category.parentid eq $categories[cat_num].categoryid || $topmostcat eq $categories[cat_num].categoryid} {$categories[cat_num].category} {else} {$categories[cat_num].category}<HR size="1" noshade class="CateMenuHr"> {/if} {if $cat eq $categories[cat_num].categoryid || $current_category.parentid eq $categories[cat_num].categoryid || $topmostcat eq $categories[cat_num].categoryid} {section name=subcat loop=$allcategories} {if $allcategories[subcat].parentid eq $categories[cat_num].categoryid} {if $cat eq $allcategories[subcat].categoryid || $current_category.parentid eq $allcategories[subcat].categoryid}{/if}{$allcategories[subcat].category}{if $cat eq $allcategories[subcat].categoryid || $current_category.parentid eq $allcategories[subcat].categoryid}{/if} {if $cat eq $allcategories[subcat].categoryid || $allcategories[$cat].parentid eq $allcategories[subcat].categoryid || $current_category.parentid eq $allcategories[subcat].categoryid} {section name=subcat2 loop=$allcategories} {if $allcategories[subcat2].parentid eq $allcategories[subcat].categoryid || $current_category.parentid eq $subcategories[subcat2].categoryid} {if $cat eq $allcategories[subcat2].categoryid}{/if}{$allcategories[subcat2].category}{if $cat eq $allcategories[subcat2].categoryid}{/if} {/if} {/section} {/if} {/if} {/section} <HR size="1" noshade class="CateMenuHr"> {/if} {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} {include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu}
[/quote]



Not working in 4.1
__________________
---------------
Current version 4.4.3
Reply With Quote
  #84  
Old 05-23-2006, 02:32 AM
 
jackel jackel is offline
 

Advanced Member
  
Join Date: May 2006
Location: United Kingdom
Posts: 48
 

Default

Does anything work in 4.1 : )
__________________
MarkH
Web Development Manager
Jackel International Limited
X-Cart Version 4.0.13 + Customisations
http://www.tommeetippee.co.uk/
Reply With Quote
  #85  
Old 05-23-2006, 02:51 PM
 
alphastara alphastara is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 39
 

Default Re: 3 Levels!

Quote:
Originally Posted by SinCabeza
Code:
{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} {assign var=topmostcat value=$current_category.categoryid_path|regex_replace:"/\/.*/":""} {if $cat eq $categories[cat_num].categoryid || $current_category.parentid eq $categories[cat_num].categoryid || $topmostcat eq $categories[cat_num].categoryid} {$categories[cat_num].category} {else} {$categories[cat_num].category}<HR size="1" noshade class="CateMenuHr"> {/if} {if $cat eq $categories[cat_num].categoryid || $current_category.parentid eq $categories[cat_num].categoryid || $topmostcat eq $categories[cat_num].categoryid} {section name=subcat loop=$allcategories} {if $allcategories[subcat].parentid eq $categories[cat_num].categoryid} {if $cat eq $allcategories[subcat].categoryid || $current_category.parentid eq $allcategories[subcat].categoryid}{/if}{$allcategories[subcat].category}{if $cat eq $allcategories[subcat].categoryid || $current_category.parentid eq $allcategories[subcat].categoryid}{/if} {if $cat eq $allcategories[subcat].categoryid || $allcategories[$cat].parentid eq $allcategories[subcat].categoryid || $current_category.parentid eq $allcategories[subcat].categoryid} {section name=subcat2 loop=$allcategories} {if $allcategories[subcat2].parentid eq $allcategories[subcat].categoryid || $current_category.parentid eq $subcategories[subcat2].categoryid} {if $cat eq $allcategories[subcat2].categoryid}{/if}{$allcategories[subcat2].category}{if $cat eq $allcategories[subcat2].categoryid}{/if} {/if} {/section} {/if} {/if} {/section} <HR size="1" noshade class="CateMenuHr"> {/if} {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} {include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu}



Not working in 4.1[/quote]

What does this code produce? I haven't tried it out yet.
__________________
Alphastara | New Age Products
www.alphastara.com.au
V: 4.1.6 + AOM
Reply With Quote
  #86  
Old 05-23-2006, 07:30 PM
 
idesign123 idesign123 is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 58
 

Default

Thanks for the great mod!
I am hoping to customize it one more step though.

Can someone help me (for pay if needed)?

Desired Customization:

- My client loves the way the left menu behaves, but does not like that the main area ALSO shows the submenu names.

- He would instead like to have it so you click the main item, and ALL products in that section (including subcategories) appears. Then when you click a subcategory, it just shows the items in that subcategory.

- Example: http://www.800paintball.com
Click 'Apparel' and all apparel products appear.
The click 'Gloves' and just the gloves appear.

If someone can set this up I would be most appreciative (and would be happy to pay you for your time).

Any takers?
__________________
version 4.0.18 (+ several cool mods)
Reply With Quote
  #87  
Old 08-24-2006, 01:35 AM
 
Reed Reed is offline
 

Member
  
Join Date: Jan 2005
Posts: 13
 

Default Re: Categories Menu - Showing Subcategories

Anyone get this mod to work for 4.0.19 yet? I tried it on a fresh install and the links did not work?
__________________
X-Cart Gold Version 4.1.5
Reply With Quote
  #88  
Old 08-31-2006, 06:30 AM
 
SMG SMG is offline
 

Newbie
  
Join Date: Aug 2006
Location: Brisbane, Australia
Posts: 8
 

Default Re: Categories Menu - Showing Subcategories

Has anyone got this code working for the latest version of Xcart?????

Does anyone know the code differences??
__________________
Paul
www.smg.com.au
Version 4.1.10
Reply With Quote
  #89  
Old 09-13-2006, 07:05 AM
 
instink instink is offline
 

Advanced Member
  
Join Date: Aug 2006
Posts: 44
 

Default Re: Categories Menu - Showing Subcategories

Hi guys, I really, REALLY want to use this mod, to at least get 1 level deep, but my problem is I am using the bluegreentech skin and when I use any of the code from this thread, nothing works properly... the categories aren't linked to, and if I try to fix the href's myself (I am a total noob) I stuff it up completely.

Currently my categories.tpl looks like this

Code:
{* $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} <li><FONT class="CategoriesList"><A href="home.php?cat={$categories[cat_num].categoryid}" class="VertMenuItems">{$categories[cat_num].category}</A></li></FONT> {/section} {else} {section name=cat_num loop=$subcategories} <li><FONT class="CategoriesList"><A href="home.php?cat={$subcategories[cat_num].categoryid}" class="VertMenuItems">{$subcategories[cat_num].category}</A></FONT> {/section} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

Can someone help me to get it to display at least 1 level deep when a category is selected, exactly as the very first post requested?

Thanks heaps.. even a pointer in the right direction would be cool.. thanks!

Justin
__________________
X-cart 4.0.16
www.jctech.com.au
Reply With Quote
  #90  
Old 10-13-2006, 04:40 PM
 
jessej jessej is offline
 

Member
  
Join Date: Oct 2006
Posts: 26
 

Default Re: Categories Menu - Showing Subcategories

Is it working in 4.1 yet? Heres what it gives in 4.1.3 http://img144.imageshack.us/img144/6043/shownerrorph9.gif
__________________
Version 4.1.3
X-Cart Pro
http://www.mallclub.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 03:38 PM.

   

 
X-Cart forums © 2001-2020