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
  #31  
Old 08-08-2005, 10:42 PM
 
whsu716 whsu716 is offline
 

Senior Member
  
Join Date: Jun 2005
Posts: 168
 

Default

any luck anyone?
__________________
...
v 4.0.18; 4.1
Reply With Quote
  #32  
Old 08-08-2005, 11:02 PM
 
whsu716 whsu716 is offline
 

Senior Member
  
Join Date: Jun 2005
Posts: 168
 

Default

anyone with the subcat fix?

sorry for the repost!
__________________
...
v 4.0.18; 4.1
Reply With Quote
  #33  
Old 08-23-2005, 08:54 AM
 
killervette killervette is offline
 

Newbie
  
Join Date: Aug 2005
Posts: 5
 

Default

this work with 4.0.14???
__________________
X-Cart version 4.0.14
Reply With Quote
  #34  
Old 09-15-2005, 09:03 AM
  STORed's Avatar 
STORed STORed is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 69
 

Default

Yes,

The code in this thread is about 9 months old. I took a look at the 4.0.14 and it looks quite different. Is ther anything similar to this fo the newer version?
__________________
Thanks.

X-Cart Gold 4.0.14 on Linux
Reply With Quote
  #35  
Old 09-19-2005, 07:30 PM
 
F5Performance F5Performance is offline
 

Senior Member
  
Join Date: Feb 2005
Location: Dallas TX
Posts: 111
 

Default

Yeah, becasue I just tried this and its wayy FUBAR.
__________________
Xcart Gold 4.0.17
mysql Ver 12.22 Distrib 4.0.16
perl versionperl, v5.8.3
php version PHP 4.3.11
Reply With Quote
  #36  
Old 09-30-2005, 05:53 AM
 
fuzzy fuzzy is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: oHIo
Posts: 77
 

Default

This works in 4.0.12--4.0.16
/xcart/skin1/categories.tpl
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} {if $cat eq $categories[cat_num].categoryid || $current_category.parentid 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} {section name=subcat loop=$allcategories} {if $allcategories[subcat].parentid eq $categories[cat_num].categoryid}{$allcategories[subcat].category} {/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 }

Now could someone maybe tweak this so the current "sub-cat" will be bold? Please! Pretty even!!
I've gotten close....but must be missing something.
__________________
X-Cart 4.0.12 Gold
Linux
Reply With Quote
  #37  
Old 10-03-2005, 03:14 PM
 
alphastara alphastara is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 39
 

Default

Thats pretty easy, with your code change the following line:
Code:
{if $allcategories[subcat].parentid eq $categories[cat_num].categoryid}{$allcategories[subcat].category}
to

Thank me later
__________________
Alphastara | New Age Products
www.alphastara.com.au
V: 4.1.6 + AOM
Reply With Quote
  #38  
Old 10-03-2005, 04:18 PM
 
fuzzy fuzzy is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: oHIo
Posts: 77
 

Default

Quote:
Originally Posted by alphastara
Thats pretty easy, with your code change the following line:
Code:
{if $allcategories[subcat].parentid eq $categories[cat_num].categoryid}{$allcategories[subcat].category}
to

Thank me later

Well Bless your pea picken heart! That works Great!
Thanks to alphastara for the final (DUH) tweak, here's the copy & paste code for
skin1/customer/categories.tpl
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} {if $cat eq $categories[cat_num].categoryid || $current_category.parentid 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} {section name=subcat loop=$allcategories} {if $allcategories[subcat].parentid eq $categories[cat_num].categoryid}{if $cat eq $allcategories[subcat].categoryid}{/if}{$allcategories[subcat].category}{if $cat eq $allcategories[subcat].categoryid}{/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 }
I also added the CSS call to match the rest.
__________________
X-Cart 4.0.12 Gold
Linux
Reply With Quote
  #39  
Old 10-03-2005, 05:06 PM
 
alphastara alphastara is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 39
 

Default

Thats great

I am now working on allowing more levels of subcategories...
__________________
Alphastara | New Age Products
www.alphastara.com.au
V: 4.1.6 + AOM
Reply With Quote
  #40  
Old 10-11-2005, 06:55 AM
 
dgreen dgreen is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 85
 

Default more levels of subcategories

Did you come up with the code to allow more levels of subcategories?
I could use something like that but I have no time to work on it. (I am under a major deadline and I am due to have a baby any day)
__________________
X-Cart version 4.1.10
upgraded from 4.0.13 myself slowly and with help from xcart forums. Thanks all!

http://www.discountseforim.com
Hebrew Seforim and Jewish Books
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 01:50 AM.

   

 
X-Cart forums © 2001-2020