Forums / All Other Contributions/Addons / Simple Category Tree

Simple Category Tree

Views: 97,118

Results 121 to 140 of 249
9 May 2008, 4:46 PM
#121
pinkchalkstudio avatar

pinkchalkstudio

New Zenner

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

Simple Category Tree

OK, everything is now in the correct place with the correct file names. It showed in the sidebox layout menu and I was able to turn it on. I have an error somewhere in my code because nothing is showing on my sidebar now.

I haven't had to debug code for anything on my site so far so I'll search through the forums to figure out how to do that and let you know what error I'm getting.

Kathy
http://www.pinkbypost.com/store/

www.pinkchalkfabrics.com - cloth, pattern + tool for modern sewists
ZC version 1.3.9h, Simple Category Tree, Super Orders

9 May 2008, 4:54 PM
#122
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple Category Tree

Try enabling debug mode using this:
https://www.zen-cart.com/tutorials/index.php?article=82

BTW, did you put all the content needed into those 2 files?

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

9 May 2008, 6:27 PM
#123
pinkchalkstudio avatar

pinkchalkstudio

New Zenner

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

Re: Simple Category Tree

Thank you yellow, I did install that debug module and found my error. A missing ';' in my version of 'my_categories.php'. Everything is working the correct way now, yay:clap:

OK, now for a few more questions: :smile:

  1. I did some reading on unordered lists. It seems like the bullets at each of my three levels are defaults. Any easy way for me to customize the look of these? I'd like to remove the bullet completely from Level 1, use the solid bullet for level two and the solid square for level 3.

  2. Can I specify the amount of the indent in the stylesheet somehow? For example, I'd like each level to indent just a bit so that the total width of my sidebox footprint is smaller.

  3. I did notice that the tree picks up categories that are disabled. I'm just going to remove these categories for now until I am ready to fully populate them for my shop.

Thank you for all your help!

Kathy

http://www.pinkbypost.com/store/

www.pinkchalkfabrics.com - cloth, pattern + tool for modern sewists
ZC version 1.3.9h, Simple Category Tree, Super Orders

9 May 2008, 8:56 PM
#125
pinkchalkstudio avatar

pinkchalkstudio

New Zenner

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

Re: Simple Category Tree

Thanks for the links. I think I've reached my limit in being able to make these types of changes. I got the bullet symbols and their colors to change. I've tried to trial and error getting the positioning to change but have failed at that.

I've also noticed that when I click on the top level Category (Cloth, Pattern or Tool) I end up with the following error:

Not Found

The requested URL http:// was not found on this server.

All the sub categories correctly link to where they're going.

Any insights?

Thank you,
Kathy

http://www.pinkbypost.com/store/

www.pinkchalkfabrics.com - cloth, pattern + tool for modern sewists
ZC version 1.3.9h, Simple Category Tree, Super Orders

16 May 2008, 3:41 AM
#126
daylightgifts avatar

daylightgifts

New Zenner

Join Date:
Jan 2008
Posts:
3
Plugin Contributions:
0

Re: Simple Category Tree

Hi,

I am having the same problem of the top level category getting the same error . I also cannot get the bullet symbols to change.

Could someone please point me in the right direction? I am a bit confused.

Thanks,
Daysi

22 May 2008, 1:39 PM
#127
sarahl avatar

sarahl

Zen Follower

Join Date:
May 2004
Location:
UK
Posts:
471
Plugin Contributions:
0

Re: Simple Category Tree

to resolve the top level category issue - do the following:

open includes/classes/simple_categories_tree.php

locate about line 195

		if(is_int($cPath) || preg_match('/[0-9]+(_[0-9]+)+/', $cPath))
			$link = zen_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath);
		else 
#			$link = $cPath;
			$link = zen_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath);
		return '<a'.$class.' href="' . $link . '">'.$categories_name.'</a>';
	}

I have commented out (using #) the "$link = $cPath;" item and replaced it with a duplicate of the line above "$link = zen_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath);" that adds in the cPath and resolves that error

Anyway if you copy the code above and copy into relevant files - clicking the top of the cats works

Enjoy :)
Sarah

23 May 2008, 4:21 PM
#128
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: Simple Category Tree

This mod looks great. Thanks for your effort here, Yellow...

I want to put this into my tpl_index_categories.php page so each category index will see a product list in links. Here is one of the pages: http://www.jonescoffeecompany.com/index.php?main_page=index&cPath=27

I've updated with most current files you've posted, and got it to list each categories sub-categories, but not the products.

Here is the code I have in tpl_index_categories.php:

<?php 
$_SESSION['category_tree']->build_deepest_level_children();
echo $_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath'], 5, false, true) ;
?>

Any idea why sub products aren't showing?

27 May 2008, 3:33 PM
#129
daylightgifts avatar

daylightgifts

New Zenner

Join Date:
Jan 2008
Posts:
3
Plugin Contributions:
0

Re: Simple Category Tree

Thanks for your help the fix worked great.:clap:

27 May 2008, 5:42 PM
#130
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: Simple Category Tree

Any ideas on this.... I'm trying to post inside the tpl_categories_index.php.... here is what I have:

echo $_SESSION['category_tree']->build_deepest_level_children('ul', 'li', '', $_GET['cPath'], 3, false, true);

I'm really stuck here (and not php expert!)... Please please help me out!! :shocking:

30 May 2008, 6:53 PM
#131
mattzeiler avatar

mattzeiler

New Zenner

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

Re: Simple Category Tree

WOW, you are a savior!!! This is exactly what I needed!

30 May 2008, 7:45 PM
#132
mattzeiler avatar

mattzeiler

New Zenner

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

Re: Simple Category Tree

Sorry for the last post, it's not working now. I had a couple of categories made up with 2 products in each and it worked fine. But then I added a third category with a new product, and it didn't find the new products I've added. No matter where I add them it just finds the ones in those original two categories. What's happening?

https://www.book-mate.co.uk/shop/

3 Jun 2008, 12:26 AM
#134
bigbadboy avatar

bigbadboy

Totally Zenned

Join Date:
Apr 2008
Location:
London
Posts:
557
Plugin Contributions:
0

Re: Simple Category Tree

I've just installed this thinking it would give me what I need, but alas ... no!

I have:
Categories
Products

I want to have shown:
Category 1
Product 1-1
Product 1-2
Product 1-3

Category 2
Product 2-1
Product 2-2
Product 2-3

etc

All I have at the moment is:

Category 1
Category 2
Category 3

etc

I have copied/ pasted and made changes as requested and checked that the sidebox is on.

Cheers in advance.

3 Jun 2008, 1:12 AM
#135
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: Simple Category Tree

bigbadboy:

I've just installed this thinking it would give me what I need, but alas ... no!

Cheers in advance.
I want the same thing!!!

3 Jun 2008, 1:44 AM
#136
bigbadboy avatar

bigbadboy

Totally Zenned

Join Date:
Apr 2008
Location:
London
Posts:
557
Plugin Contributions:
0

Re: Simple Category Tree

I think a lot of people are wanting the same.

:smile:

5 Jun 2008, 1:54 AM
#137
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: Simple Category Tree

Thanks so much for this MOD, it worked great and this is what I needed.

Ok, so question:

I see how it works by parsing through and showing all the products in the sub-categories of a top-level category on the top-level category page.

I want to add a drop-down to filter through to the specific categories on that top-level page, so a user can click the drop-down and essentially see the sub-category... what file should I edit to do this?

9 Jun 2008, 12:48 PM
#138
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: Simple Category Tree

bigbadboy:

I think a lot of people are wanting the same.

:smile:

Does anyone know a solution to showing products by category? I'd be willing to chunk some money into it. Here's what I want it to look like (click category index at top!).

Any ideas??

16 Jun 2008, 4:24 AM
#139
fightthefourwalls avatar

fightthefourwalls

New Zenner

Join Date:
Nov 2007
Posts:
57
Plugin Contributions:
0

Re: Simple Category Tree

Hey again all,

I have noticed on my test site that if you only go part way down the categories tree and click on the product (as they are showing up in parent categories now :D) the breadcrumbs only show to where you navigated, not where the product is situated.
BUT...
If I click on it through the "New Products" field it comes up with the full path of the product. Is there any way to port the breadcrumbs function from the New Products file so that all products come up with the full breadcrumbs path?

Thanks,
Nick.

18 Jul 2008, 2:30 PM
#140
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Simple Category Tree

Hi Gang,

Yello - thanks so much for the mod. Trying to understand the simple tweaking parameters but I have the hardest time (no php programmer).
I thing I understand that all the tweaking is to be done in the:

$content .= $_SESSION['category_tree']->build_category_string($parent_tag = 'div', $child_tag = 'span', $divider = '<br>', $categories_id = 0, $max_level = 2, $include_root = false, $strict = false);
?>

But what I don't get is the parameters themselves. For example what should I add if I want to indent the childs compared to the parents (without using list)? Or even more, how can I format the style of the child?

Much appreciated!
thanks,
gabstero