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 > Changing and adding new features
 
Thread Tools Search this Thread
  #101  
Old 02-26-2007, 08:51 PM
 
nostraduckus nostraduckus is offline
 

Member
  
Join Date: Jan 2007
Posts: 19
 

Default Re: Categories Menu - Showing Subcategories

Im using version 4.0.19...I have copied and pasted the different variations of complete code that are in this thread...the best I get is a menu with line seperators, but you cant click on any of the menu items!?! (ie they are not links)

I am pasting the code into customer/categories.tpl...is there anything else I should be doing?

Simply want a menu that looks like this

Cat A (link)
Sub Cat 1 (link)
Sub Cat 2 (link)
Cat B (link)
Sub Cat 1 (link)
Sub Cat 2 (link)

etc....

what am I doing wrong?
__________________
ming@rumplequiltskin.com.au
www.rumplequiltskin.com.au
NSW, Australia
X-Cart Version 4.0.19
Reply With Quote
  #102  
Old 02-26-2007, 09:24 PM
 
nostraduckus nostraduckus is offline
 

Member
  
Join Date: Jan 2007
Posts: 19
 

Default Re: Categories Menu - Showing Subcategories

I have got the menu posted by Chris2002 to work.. (added code to categories.php and categories.tpl)

Is there a way to modify it so that it only shows the sub categories when you click on the root category? at the moment it is showing everything in the tree..
__________________
ming@rumplequiltskin.com.au
www.rumplequiltskin.com.au
NSW, Australia
X-Cart Version 4.0.19
Reply With Quote
  #103  
Old 02-27-2007, 03:30 PM
  chris2002's Avatar 
chris2002 chris2002 is offline
 

Advanced Member
  
Join Date: Mar 2006
Location: French Polynesia
Posts: 30
 

Default Re: Categories Menu - Showing Subcategories

Hello,

sorry for the delay,

See this post for your adaptation
http://forum.x-cart.com/showthread.php?p=162134#post162134

thank you
__________________
Chris
----------------------------------------
X-Cart Gold 4.1.xx / 4.2.xx
Need some Help in french
Webdesign or else.
----------------------------------------
Reply With Quote
  #104  
Old 02-27-2007, 08:09 PM
 
nostraduckus nostraduckus is offline
 

Member
  
Join Date: Jan 2007
Posts: 19
 

Default Re: Categories Menu - Showing Subcategories

Oh man! Sooooooooo close! The menu functions how I would like, but the problem is, it has repeated my company logo...somehow it is calling the head.tpl in the loop i assume, or the code is not compatible with 4.0.19
__________________
ming@rumplequiltskin.com.au
www.rumplequiltskin.com.au
NSW, Australia
X-Cart Version 4.0.19
Reply With Quote
  #105  
Old 02-28-2007, 11:33 AM
  chris2002's Avatar 
chris2002 chris2002 is offline
 

Advanced Member
  
Join Date: Mar 2006
Location: French Polynesia
Posts: 30
 

Default Re: Categories Menu - Showing Subcategories

Hello,
Plz could you post your code online, then we can see the problem to reply.
thank you
__________________
Chris
----------------------------------------
X-Cart Gold 4.1.xx / 4.2.xx
Need some Help in french
Webdesign or else.
----------------------------------------
Reply With Quote
  #106  
Old 02-28-2007, 11:34 AM
  chris2002's Avatar 
chris2002 chris2002 is offline
 

Advanced Member
  
Join Date: Mar 2006
Location: French Polynesia
Posts: 30
 

Default Re: Categories Menu - Showing Subcategories

Or upgrade to 4.1.6.......loool...kidding
__________________
Chris
----------------------------------------
X-Cart Gold 4.1.xx / 4.2.xx
Need some Help in french
Webdesign or else.
----------------------------------------
Reply With Quote
  #107  
Old 02-28-2007, 07:27 PM
 
nostraduckus nostraduckus is offline
 

Member
  
Join Date: Jan 2007
Posts: 19
 

Default Re: Categories Menu - Showing Subcategories

Well I am just over the moon. Gave it one last shot and I now have it working!

So for those of you that have 4.0.19 and want a menu like this:

CatA (link)
SubCat1 (link)
SubCat2 (link)

CatB (link)
CatC (link)

- The CURRENT category AND subcategory will be in bold
- The categories will still be in the default menu.tpl. (the code is based on awasson's menu mod..his div layer caused my head.tpl to repeat)
- Looks fine in Firefox and Internet Explorer

Here's my categories.tpl:

Code:
{capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="fc_cellpadding" value="0"} {else} {if $config.General.root_categories eq "Y"} {foreach from=$categories item=c} ___________________________<br><br> {if $cat eq $c.categoryid || $current_category.parentid eq $c.categoryid} <font class="ProductMain"><b><a class="current" href="home.php?cat={$c.categoryid}">{$c.category}</a></b></font><br> {else} <font class="ProductMain"><a href="home.php?cat={$c.categoryid}">{$c.category}</a></font><br> {/if} {assign var=in value=$c.categoryid} {* CONDITIONAL DROP DOWN ITEMS FROM TOP CATEGORY *} {if $current_category.parentid eq $c.categoryid || $cat eq $c.categoryid} {foreach from=$allsubcategories.$in item=c } {if $cat eq $c.categoryid} &nbsp&nbsp&nbsp<font class="ProductSub"><b><a class="current" href="home.php?cat={$c.categoryid}">{$c.category}</a></b></font><br> {else} &nbsp&nbsp&nbsp<font class="ProductSub"><a href="home.php?cat={$c.categoryid}">{$c.category}</a></font> <br> {/if} {/foreach} {/if} {* /CONDITIONAL *} {/foreach} {else} {foreach from=$subcategories item=c key=catid} <a href="home.php?cat={$catid}">{$c.category}</a> {/foreach} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}

then I added these classes to skin1.css:

Code:
.ProductMain { FONT-SIZE: 12px; } .ProductSub { FONT-SIZE: 10px; }

I am really new to editing code so sorry if it's messy... would appreciate any constructive criticism.
__________________
ming@rumplequiltskin.com.au
www.rumplequiltskin.com.au
NSW, Australia
X-Cart Version 4.0.19
Reply With Quote
  #108  
Old 03-01-2007, 03:27 PM
 
nostraduckus nostraduckus is offline
 

Member
  
Join Date: Jan 2007
Posts: 19
 

Default Re: Categories Menu - Showing Subcategories

Anyone know how I can add more levels of sub categories to this?
__________________
ming@rumplequiltskin.com.au
www.rumplequiltskin.com.au
NSW, Australia
X-Cart Version 4.0.19
Reply With Quote
  #109  
Old 05-04-2007, 07:29 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

Default Re: Categories Menu - Showing Subcategories

Anyone have this working in 4.1.7? I can't get it to work no matter what I do
__________________
Christmas
x-cart 4.1.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:55 PM.

   

 
X-Cart forums © 2001-2018