New Zenner
- Join Date:
- Jan 2007
- Posts:
- 54
- Plugin Contributions:
- 0
Enable Sub-Categories
How can i enable sub categories?
When I click on the category button in admin it does not give me an option to add another category. Only products.
New Zenner
How can i enable sub categories?
When I click on the category button in admin it does not give me an option to add another category. Only products.
Totally Zenned
bjmhistory:
How can i enable sub categories?
When I click on the category button in admin it does not give me an option to add another category. Only products.
Do you have products in the top-level? Delete any products that do not have a category and make sure all products are given a category. Then you will be able to add subcategories. I think that may be your issue?
New Zenner
It's strange. I am working from the Top Level. I add a category. and no option is given to add a category within that. There is a note on the top level beside 'new category' that states "this category has sub categories" but who knows what that means.
It's funny, I installed another zen into a different directory to use for the magazine site and it is not giving me this problem.
Totally Zenned
bjmhistory:
It's strange. I am working from the Top Level. I add a category. and no option is given to add a category within that. There is a note on the top level beside 'new category' that states "this category has sub categories" but who knows what that means.
It's funny, I installed another zen into a different directory to use for the magazine site and it is not giving me this problem.
That is odd. You enter the category you want to have a subcategory in, right? And there's no add category link? Do you have products within the category that you want to add a sub-category to? If so, delete it and see.
New Zenner
In the file "admin/categories.php" around line 593 there is code that checks to see if the the current category has subcategories or products.
If it has categories, it sets $zc_skip_products and $zc_skip_categories to true or false. Later on down the page it uses those to decide if the add product and/or add category button should be shown.
If there are products in a subcategory, then you can't add subcategories.
If there are subcategories in a category, then you can't add products.
This seems dumb to me. Am I missing something?
For example as a tree of categories and products I want where 'prod' means a product and 'cat' means a subcategory with outline levels:
prod a
prod b
cat 1
. prod 1.c
. prod 1.d
. cat 1.1
. . prod 1.1.e
. . prod 1.1.f
. . cat 1.1.1
. . . . prod 1.1.1.g
. . cat 1.1.2
. . . . prod 1.1.2.h
. cat 1.2
. . .cat 1.2.1
. . . . cat 1.2.1.1
. . . . . prod 1.2.1.1i
. . . . cat 1.2.1.2
. . . . . cat 1.2.1.2.1
. . . . . . prod 1.2.1.2.1j
. . . . cat 1.2.1.3
. . . . . prod 1.2.1.3k
cat 2
. prod 2l
. prod 2m
. cat 2.1
. . prod 2.1n
. . cat 2.1.1
. . . prod 2.1.1o
cat 3
. prod 3p
So, how can I do that when there is this thing about hidding the add product and add category buttons with $zc_skip_products and $zc_skip_categories?
Is there a configuration to turn this off? Can I simply force $zc_skip_products and $zc_skip_categories to be false and not have any unintended consequences?
real live example in version 1.2.7 that works fine
http://neasesneedlework.com/index.php?main_page=index&cPath=5
It has a product, but if you look to the left in the categories box you will see that tools has a subcategory named "cross stitch tools" at the same level as the product.
If I move to 1.3.7, I can't do that anymore. Is there a reason for this?
Thanks
Bill Wheaton
http://neasesneedlework.com
Totally Zenned
billwheaton:
This seems dumb to me. Am I missing something?
It's not dumb, its there for a reason... Combining categories and products in the same level causes issues with pricing and searches. They are not meant to be mixed.
New Zenner
First, let me say thanks for your quick response.
jettrue:
It's not dumb, its there for a reason... Combining categories and products in the same level causes issues with pricing and searches. They are not meant to be mixed.
Thanks. That's why I said "seems dumb" not "is dumb". I thought I might have been ignorant of the reasoning. But indeed, they are meant to be mixed. Rather, they were simply not programmed to do so.
Hardware stores are instructional for so many things in life, so here is one off the top of my head:
In an Ace Hardware store's hardware department say I sell fasteners, generally. The most general fastener is at the top of the category, "glue" for instance. And I sell specific fasteners like nails, screws, bolts and and rivets. Under bolts I have normal bolts that sell most commonly and thus I want them to be higher in the hierarchy where I also want to sell "locktite bolt glue" there because it is specific to bolts, but is useless with other kinds of fasters like rivets or nails.
But I have other lines of bolts that are less commonly sold, such as those with left handed threads, Marine grade bolts, or highly hardened bolts used for bolting parts on railroad cars. To extend this analogy I also sell paint, and because the evil empire, "Home Despot" is driving me out of business, I also sell nice gifts and pretty smelling soap and a line of Union-Made clothing, green egg barbeque and a boatload of Bone Suckin Sauce. All of these subcategories have their own reliance on mixing product and categories at the same level.
So, as you see, without having the ability to mix categories with products, I can't fairly or logically represent "locktite bolt glue" alongside normal bolts and above the various categories of specialty bolts. But none of that has anything to do with being able to find something in a hardware store, and I haven't ever seen a hardware store not charge for the cheapest 3 cent washer (nor give you a significant break if you buy a whole box full).
I'm not trying to be a wise guy or anything, but this is a real problem if I can't do the foregoing.
If having products and subcategories at the same level causes issues, then can the issues be resolved without this significant limitation of the normal operation of a fairly normal hierarchical outline structure as I showed? Lots of systems have such normal data structure. This BBS system is an example. Tons of others. This is like having a tree that only allows leaves on the outermost twigs. It makes for a pretty sparce tree.
Do you know what the pricing and search issues are so that I can begin to investigate an amicable resolution? This wasn't an issue in version 1.2.7. What was introduced since then that might have been a issue? Do you know which version the issues were introduced? Are there other problem that you know of that involve this issue? Are there links to other discussions of this issue in this forum that you can point me to?
Again, thanks for your help.
Bill Wheaton
http://neasesneedlework.com
Totally Zenned
billwheaton:
In an Ace Hardware store's hardware department say I sell fasteners, generally. The most general fastener is at the top of the category, "glue" for instance. And I sell specific fasteners like nails, screws, bolts and and rivets. Under bolts I have normal bolts that sell most commonly and thus I want them to be higher in the hierarchy where I also want to sell "locktite bolt glue" there because it is specific to bolts, but is useless with other kinds of fasters like rivets or nails.
But I have other lines of bolts that are less commonly sold, such as those with left handed threads, Marine grade bolts, or highly hardened bolts used for bolting parts on railroad cars. To extend this analogy I also sell paint, and because the evil empire, "Home Despot" is driving me out of business, I also sell nice gifts and pretty smelling soap and a line of Union-Made clothing, green egg barbeque and a boatload of Bone Suckin Sauce. All of these subcategories have their own reliance on mixing product and categories at the same level.
I'm not saying what you would like isn't necessary, but I do have to say I don't understand why your above reasoning requires products and categories to be mixed. If I were you, the more commonly sold items would just have a lower sort order within their own category, so that they are seen first. I guess I'm not grasping the "these bolts are more commonly sold, so they can't be in a category with other bolts".
I'm also not getting the fact that you're saying this is a sparse tree, you can do:
Category A
..with Products
Category B
...with Subcategory A
......with Products
...with Subcategory B
......with sub-subcategory A
..........with Products
......with sub-subcategory B
............with sub-sub-subcategory A
..................with Products
............with sub-sub-subcategory B
..................with Products
......with sub-subcategory C
............with Products
Category C
etc. etc. etc.
Also, lets say you want to have locktite bolt glue in 5 different places, you are also capable of "linking" the product to multiple categories, so you could place it as the first item within a category of fasteners that actually use it, and not put it in the category of fasteners that do not use it.
The issues with pricing and searching were always there. I don't know the exact details, but zen cart has been like this from the beginning, and I know that people had issues.
New Zenner
jettrue:
I'm not saying what you would like isn't necessary, but I do have to say I don't understand why your above reasoning requires products and categories to be mixed. If I were you, the more commonly sold items would just have a lower sort order within their own category, so that they are seen first. I guess I'm not grasping the "these bolts are more commonly sold, so they can't be in a category with other bolts".
I'm also not getting the fact that you're saying this is a sparse tree, you can do:
Category A
..with Products
Category B
...with Subcategory A
......with Products
...with Subcategory B
......with sub-subcategory A
..........with Products
......with sub-subcategory B
............with sub-sub-subcategory A
..................with Products
............with sub-sub-subcategory B
..................with Products
......with sub-subcategory C
............with Products
Category C
etc. etc. etc.Also, lets say you want to have locktite bolt glue in 5 different places, you are also capable of "linking" the product to multiple categories, so you could place it as the first item within a category of fasteners that actually use it, and not put it in the category of fasteners that do not use it.
The issues with pricing and searching were always there. I don't know the exact details, but zen cart has been like this from the beginning, and I know that people had issues.
with your example, lets say I want to get to the product marked in bold below:
Category A
..with Products
Category B
...with Subcategory A
......with Products
...with Subcategory B
......with sub-subcategory A
..........with Products
......with sub-subcategory B
............with sub-sub-subcategory A
..................with Products
............with sub-sub-subcategory B
..................with Products
......with sub-subcategory C
............with Products
Category C
the way that it works in zc now is that you have to go to Category B to display Subcategory A and Subcategory B. Thats one click and no products yet. Then I have to go to with Subcategory B to display with sub-subcategory A, sub-subcategory B and sub-subcategory C. That's two clicks and no products to show the user yet. then I have to hit with sub-subcategory B to show sub-sub-subcategory A, sub-sub-subcategory B and sub-sub-subcategory C. That's three clicks, and still no products to show the user yet. Then I have to hit sub-sub-subcategory A to display the final target products.
That's four clicks and four page reloads and four chances of the user getting distracted by banners or AdSense ads or something with no products being shown in the category area in the center of the screen. That's four pages that get indexed by google with no product on it for the user to buy something by clicking on it. Every category page with no product on it that gets googled may be a chance for the user to enter the site, and there they will go... and there won't be a product on it, only categories.
Sure, each one displays a nice set of category icons, and the "define_main_page" page (again), but I'm not selling categories, I'm selling things in categories. If the user gets a phone call while they are on a category with no products, then they could be staring at the screen with no products on it for ten minutes talking to their girlfriends and never get back to it again. Thats a bad thing.
But if they are seeing a really nice expensive Mirabilia pattern, or a popular Teresa Wenzler design, then they are going to be staring at that for ten minutes and buy it the moment they get off the phone and probably tell their girlfriend about it. I want that to happen.
So every chance I have of selling something needs to have the "right" thing there. So if Locktite should be "there" and only "there" then I can't very well add it "somewhere else" and then have "links", because then it would effectively be in two places which may not make much sense.
Linking is a very cool thing, don't get me wrong. But its not the answer in all cases. Linking is great when you are cross-selling across categories, and that happens all the time. In Cross Stitch, something might be both a "Sampler" and "Hardanger" at the same time, thus linking is a good idea. I understand that, and use it.
But to explain what I mean using your map, here it is again with modifications...
A modification of your map, with products added in (in red) yields this:
a general toplevel product (not targeted at all except that the user is on the site)
another toplevel product color=red[/color]
Category A
..with Products
Category B
...with a 'b' type product (which is somewhat in the ballpark)
...with Subcategory A
......with Products
...with Subcategory B
......with a specialized 'b' type product which is actually 'b.b' (which is more targeted)
......with sub-subcategory A
..........with Products
......with sub-subcategory B
............with a specialized 'b.b' product which is actually 'b.b.b' (even more specialized)
............with sub-sub-subcategory A
..................with Products the 'b.b.b.a' product which is what the user was looking for (right on target)
............with sub-sub-subcategory B
..................with Products
......with sub-subcategory C
............with Products
Category C
So if they are eventually going to the same location in the tree, at least they will have more and more targeted products displayed to them on the way with each of the four clicks. And who knows, they might buy what they need when they get to the eventual target, and then remember that at a higher level they saw "locktight" along with a whole slew of other general bolt products there, like a battery anode cleaning tool, a box of socket wrenches, broken bolt extraction bits, neoprene bolt gaskets or rustoleum paint to keep the rust off. And yeah, they might get distracted on the way down to their target and buy something else. But who cares? They bought something! And I am cross selling them the whole way, so they might even buy something else too. Without showing them something to buy, you can pretty much bet they won't buy it.
Now you are probably saying, "if you are running 'nested' categories, they won't show up when there are products at the same level". That is true. (see the calculation of $category_depth in header.php and how it is used in main_template_vars.php). But if you modify tpl_index_product_list slightly to show a simple (like the ez-pages horz-nav) navigator showing the subcategories at the same level as the products, then you are all set.
I have done that. It looks good, but I had no products at the same level as subcategories, and when I went to add them, I found out you can't, and it's due to the hiding of the add product and add category buttons in Admin.
So, I un-hid those two buttons and created categories at the same level as products and visa-versa, and it works fine.
I also linked products across to the same level, and even did some duplication, and some moves. I saw nothing there that was a problem with searches, and I didn't see anything wrong with pricing either.
But ever since you mentioned it, I'm scared now to put it all into the production environment and find out that it breaks at an inopportune moment. I would really love to find out what you are talking about so that I can do some unit and regression testing.
Again, thanks for your interest.
-Bill Wheaton
http://neasesneedlework.com
New Zenner
I must have opened a can of worms. My bad. You were right though.
If you have products in that category you cannot add sub-catagories.
No problem. A simple fix.
good enough:)
Thanks for the help.
New Zenner
Don't forget to delete that original category though. The customers find it confusing if you don't.
bjmhistory:
I must have opened a can of worms. My bad. You were right though.
If you have products in that category you cannot add sub-catagories.
No problem. A simple fix.
- Create a new category.
- Create the desired sub-categories before adding products.
- Hit the move button on your original category to the new sub-catagory(ies).
good enough:)
Thanks for the help.
New Zenner
worms is good. makes compost and makes things grow!
bjmhistory:
Don't forget to delete that original category though. The customers find it confusing if you don't.
And this is true. But as it stands, the only way for users to get to those categories is by using the categories sidebox. Because as I say, if there are products, and subcategories to show, then products get priority, and there won't be links for the subcategories in the middle, so you need the sidebox...
Of course that changes if you do what I did :) (rewired it, like tim allen)
seriously if you want to do it easy, do this... edit admin/categories.php.
find this on line 600:
if ($check_products == 0) {
$zc_skip_products = false;
$zc_skip_categories = false;
}
if ($check_categories == true) {
$zc_skip_products = true;
$zc_skip_categories = false;
}
if ($check_products > 0) {
$zc_skip_products = false;
$zc_skip_categories = true;
}
and comment it out.
That way the add products and the add categories buttons always show.
-Bill Wheaton
http://neasesneedlework.com
Totally Zenned
billwheaton:
But ever since you mentioned it, I'm scared now to put it all into the production environment and find out that it breaks at an inopportune moment. I would really love to find out what you are talking about so that I can do some unit and regression testing.
Again, thanks for your interest.
-Bill Wheaton
http://neasesneedlework.com
Honestly, I don't know exactly what the issue are, (I just know there are reported ones) so to find out, you'd be better served starting a new topic with that question.
I can see what you're saying, another option for you is to have "featured products" shown below the next subcategory link. These would show on each category page where there is no products for people to visit, as you mentioned. I'm pretty sure there is even an option where if filters and only featured products within that top level category show up.
And if part of your goal is to decrease links to each category, the best bet would be to keep everything as shallow as possible, and just have more main categories.
New Zenner
jettrue:
Honestly, I don't know exactly what the issue are, (I just know there are reported ones) so to find out, you'd be better served starting a new topic with that question.
jettrue:
...These would show on each category page where there is no products for people to visit, as you mentioned. I'm pretty sure there is even an option where if filters and only featured products within that top level category show up.
And if part of your goal is to decrease links to each category, the best bet would be to keep everything as shallow as possible, and just have more main categories.
Good tips. Well worth thinking about. And I think I will take you up on creating another topic. For reference, I will link back here.
Thanks
Bill Wheaton
http://neasesneedlework.com
New Zenner
bjmhistory:
How can i enable sub categories?
When I click on the category button in admin it does not give me an option to add another category. Only products.
Ooh. I just tried the sub-category feature and moved one of my categories into a sub-category.
The effect on the online catalog is very cool. Very nice.
OK. I'm finally officially hooked.
doug
Zen Follower
Billwheaton, don't know if this is what you're looking for but as one of the posters stated above: If you turn off the status of your category. You should then be able to edit it and add a subcategory. After you do this, just don't forget to enable it again.
Hope this helps.
New Zenner
Robbyn7:
Billwheaton, don't know if this is what you're looking for but as one of the posters stated above: If you turn off the status of your category. You should then be able to edit it and add a subcategory. After you do this, just don't forget to enable it again.
Hope this helps.
:clap:
That's the solution! Thank You!
New Zenner
I would agree that having the option to mix sub-categories and products in the categories is much better than either one alone.
I've been using the mix of both on my site for 5-years with no known problems, but then I upgraded last month to v1.3.9a six weeks ago. I just tried to add a new sub-category, by moving one from the root, to a mixed area and got the error warning.
So far I haven't noticed any problems in v1.3.9a with mixed categories, but the warning makes me nervious.
It would be nice to have the fixed this in 2.0.
Thanks, Alan
New Zenner
Hello,
I am also facing issue while adding subcategory. Can anyone tell me how to add new sub category if you made new main category. There are no product in any category.
thanks
Vilas
Black Belt
This is not something that can just be "fixed"... it's a consequence of the way the products and categories are structured, and the category system would probably need to be rebuilt from the ground up with a totally different scheme to inherently avoid the issues. There might be tweaks and band-aids that could be piled on top of the existing code to get around issues - I really have no idea what/how.
Meanwhile, featured products can be used for the exact purposes posters here are wanting: products under a general category that are displayed along with the subcategory listing. The featured centerbox can be set (it is by default) to display desired products from subcategories of the category being viewed. That combined with linked products to display the product in whatever categories are relevant gives considerable flexibility.
Vilas - If you have created a main category with no subcats or products yet, click the little "folder" icon to the left of the category name. You will then see a page with the "new category" and "new product" buttons.
Tell staff why this post should be reviewed.