Forums / Templates, Stylesheets, Page Layout / Showing subcategories on the index page

Showing subcategories on the index page

Views: 12,596

Results 21 to 40 of 43
29 Jun 2007, 7:33 AM
#21
pm_vibes avatar

pm_vibes

New Zenner

Join Date:
Apr 2007
Posts:
7
Plugin Contributions:
0

Showing subcategories on the index page

Up to this thread, maybe someone else is interested into this thing like me...

I guess there isn't any solution yet... :cry:

I really need this feature.

29 Jun 2007, 7:47 AM
#22
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: Showing subcategories on the index page

I'm using ch_category_1.3x_a1.zip. I don't have the problem you described with the subcategories. They display fine for me:
www.adamantbarbell.com

Adamant Barbell - Home & commercial gym equipment - Since 2007
www.adamantbarbell.com

29 Jun 2007, 3:53 PM
#23
pm_vibes avatar

pm_vibes

New Zenner

Join Date:
Apr 2007
Posts:
7
Plugin Contributions:
0

Re: Showing subcategories on the index page

fakeDecoy:

I'm using ch_category_1.3x_a1.zip. I don't have the problem you described with the subcategories. They display fine for me:
www.adamantbarbell.com

Great! That works :smile:

(this is the topic you're referring to: http://www.zen-cart.com/forum/showthread.php?p=282579#post282579 it took me a while to find it)

But I have another request: I would like to show only one subcategory level, not all levels (except for the current path). I've tried to change the code for my purpose but I can't make it works.
Any suggestions? I think you have only to change some lines on ch_categories_tree_generator.php
Maybe I have to ask to the script author?

11 Aug 2007, 4:47 PM
#24
webbles avatar

webbles

New Zenner

Join Date:
Aug 2007
Posts:
1
Plugin Contributions:
0

Re: Showing subcategories on the index page

I figured out the problem with the subcategory. Go into the file "classes/category_list.php". Find the lines

$box_categories_array[$icount]['next_id']=false;
$box_categories_array[$icount]['is_product']=false;
$box_categories_array[$icount]['level']=$level;

Move those lines below the line

foreach ($this->data[$parent_id] as $category_id => $category){

Also, if you want to limit the depth of the subcategories that are displayed, set the $max_level variable in the class to the maximum depth you want to display.

17 Aug 2007, 7:11 PM
#25
zkitten avatar

zkitten

New Zenner

Join Date:
Apr 2007
Posts:
19
Plugin Contributions:
0

Re: Showing subcategories on the index page

webbles:

I figured out the problem with the subcategory.

:clap::clap::clap:
thank you!!

6 Sep 2007, 9:36 PM
#26
threddies_com avatar

threddies_com

New Zenner

Join Date:
May 2007
Posts:
28
Plugin Contributions:
0

Re: Showing subcategories on the index page

Has anyone figured out how to limit the Category List Expansion to only the first subcategory yet? Using the Expanded Category List mod (ch_category_1.3x_a1.zip), specifically?

I am assuming that a change would have to be made in ch_categories_tree_generator.php but I have no idea where to even begin, as I have very very little PHP knowledge...

I've scoured various threads on this mod, and invariably the question of limiting the depth of categories displayed comes up, yet it always remains unanswered...

Who's got an answer for me? I'll be your best friend. :P

24 Sep 2007, 5:23 AM
#27
wasana avatar

wasana

Zen Follower

Join Date:
Apr 2006
Location:
Chiang Mai
Posts:
203
Plugin Contributions:
0

Re: Showing subcategories on the index page

to limit display to first level of subcategories and not to display products ---

the tip to "set the $max_level variable" in classes/category_list.php

didn't work for me, but did provide some clues...

I commented out ( // ) line 73

**//$this->build_products($category_id, $category_link,$level);
**
This was pure guesswork with no technical knowledge.... I have not seen any problems yet - but now products are not displayed. Not sure how to limit subcategories though...

14 Oct 2007, 8:42 PM
#29
cinbou avatar

cinbou

New Zenner

Join Date:
Aug 2007
Posts:
91
Plugin Contributions:
0

Re: Showing subcategories on the index page

I just downloaded and put all the files in the correct place and nothing happened for me either.

Hmm! Anyone know why? Here is the link to my site: https://www.providencefirevideos.com/cart

16 Oct 2007, 1:13 AM
#30
dni avatar

dni

New Zenner

Join Date:
Oct 2006
Posts:
64
Plugin Contributions:
0

Re: Showing subcategories on the index page

figured it out -
it just needed to be turned on...
doh!

TOOLS --> LAYOUT BOX CONTOLLER --->
Box Name: category_list_box.php

16 Oct 2007, 2:24 AM
#31
dni avatar

dni

New Zenner

Join Date:
Oct 2006
Posts:
64
Plugin Contributions:
0

Re: Showing subcategories on the index page

i can't get my site not to have either the indentation problem that i get with "expanded_category_list_1.0" i.e.

Category
SubCategory1

SubCategory2
SubCategory3

nor can i get the other solution (ch_category_1.3x_a1) to do anything at all for me

the solution that is implemented here http://www.adamantbarbell.com/ is exactly what i want

which one did you use?

15 Nov 2007, 12:30 PM
#32
joshlfisher avatar

joshlfisher

New Zenner

Join Date:
Jul 2006
Posts:
93
Plugin Contributions:
0

Re: Showing subcategories on the index page

webbles:

I figured out the problem with the subcategory. Go into the file "classes/category_list.php". Find the lines

$box_categories_array[$icount]['next_id']=false;
$box_categories_array[$icount]['is_product']=false;
$box_categories_array[$icount]['level']=$level;

> 
> Move those lines below the line
> ```php
foreach ($this->data[$parent_id] as $category_id => $category){

Also, if you want to limit the depth of the subcategories that are displayed, set the $max_level variable in the class to the maximum depth you want to display.

Worked perfect for me too! :clap:
Thanks!

4 Sep 2008, 2:23 PM
#33
sainfate avatar

sainfate

New Zenner

Join Date:
Oct 2007
Posts:
18
Plugin Contributions:
0

Re: Showing subcategories on the index page

Is there a way to have Expanded Category List not show the inactive categories...

I have a couple that are switched off in my admin because all the products in those categories are out of stock anyway, however Expanded Category List still list every single category.

Thanks

4 Sep 2008, 3:01 PM
#34
welchyboy avatar

welchyboy

Zen Follower

Join Date:
Apr 2008
Posts:
274
Plugin Contributions:
0

Re: Showing subcategories on the index page

I need help with some category issues as well. I have not tried the expanded category because the client just came to me and decided to change their mind. I am interested in having like a HOME link, Contact Us, and some more regular links on the left hand side where the categories go but I also would like to have a link that says PRODUCTS you click that a subcategory comes down and shows like DIPS, Pans, Chili etc then you click on Dips and it will take you to the category view. If anyone can help me figure out how to do this. I am thinking this is a rather easy question for many of you I haven't researched it much. I will work on downloading the expanded category addon to see if i can get that to do what i need. I am interested in having a category menu similar to this...

http://www.tracygloverstudio.com/index.php?id=artist

I don't need the fancy flyout menu just need it to come down or something. Any thoughts?

11 Sep 2008, 2:38 AM
#35
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: Showing subcategories on the index page

i have hide categories and i'm trying to figure out where to how to merge it to this mod

https://www.gorillagear.ca = zencart v1.3.9h with 40+ mods

11 Sep 2008, 2:55 AM
#36
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: Showing subcategories on the index page

this is all i have to add from the categories sidebox

after $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
add this code

//  Begin hideCategories code
    list($nada, $mycpath)= split('=', $box_categories_array[$i]['path']);
    $mycid = split('_', $mycpath);
    $categories_id = array_pop($mycid);
    $hide_status = $db->Execute("select visibility_status 
    				FROM " . TABLE_HIDE_CATEGORIES . "
    				WHERE categories_id = " . $categories_id . "
    				LIMIT 1");
    if ($hide_status->fields['visibility_status'] < 1) {
//  End hideCategories code

and above if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
add this

 } //  hideCategories code

nothing happends to the side box blowout is still visible i even added a top catagory and hide/turned it off but it still shows up

https://www.gorillagear.ca = zencart v1.3.9h with 40+ mods

11 Sep 2008, 3:05 AM
#37
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: Showing subcategories on the index page

i went 3 layers deep to items the items in the 3rd layer but what em i missing

https://www.gorillagear.ca = zencart v1.3.9h with 40+ mods

14 Sep 2008, 7:17 AM
#38
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: Showing subcategories on the index page

the thing is a catagory that is turned off still shows up

https://www.gorillagear.ca = zencart v1.3.9h with 40+ mods

24 Sep 2008, 4:44 AM
#39
antondesignstudio avatar

antondesignstudio

New Zenner

Join Date:
May 2008
Posts:
9
Plugin Contributions:
0

Re: Showing subcategories on the index page

Could this module be modified to work as a horizontal menu as well and not a sidebox? I am trying to create a menu like http://www.ae.com. Is this possible? Any advice?

10 Aug 2009, 11:14 PM
#40
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: Showing subcategories on the index page

Can the Expanded Categories List mod be modified to show only the first subcategory? This was brought up before but I don't think it was resolved here.

Adamant Barbell - Home & commercial gym equipment - Since 2007
www.adamantbarbell.com