Forums / Setting Up Categories, Products, Attributes / Subcategories products in Parent Categories

Subcategories products in Parent Categories

Locked

Views: 9,892

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
24 Jan 2008, 3:45 AM
#1
fightthefourwalls avatar

fightthefourwalls

New Zenner

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

Subcategories products in Parent Categories

Hey,

I am after the same sort of thing that Amazon.com and other similar sites have where when you select a category, all products under that category are shown and then are narrowed down when the user selects a subcategory.

EG if I had a category called MP3 players, it would show all of the products (1gb, 2gb, 4gb, 8gb, 16gb, etc) even though all of these products are in subcategories. I know you can do this by using the link function but I will be adding literally thousands of products and will have category trees up to 5 generations!

A quick fix for this would be awesome as it is the final thing I need before putting up my website!!

Thanks!

24 Jan 2008, 3:50 AM
#2
fightthefourwalls avatar

fightthefourwalls

New Zenner

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

Re: Subcategories products in Parent Categories

Hey,

I know you can do this by linking, but as I will be adding many many products and will have category trees up to 5 generations deep, I am wondering if there is any easy fix to having all of the products even in the deepest subcategories show up in the main categories? As linking every single product to the multiple parent categories will be a nightmare.

This means that if I had a category called MP3 players, and the different sized MP3 players were in different subcategory folders (eg 1gb, 2gb, 4gb, 8gb, etc) they would all show up under the main category 'MP3 players' and the subcategories would be used as a sort of filter.

I am more than happy to change the hard coding and install mods if anyone has a solution to this. Please help as I really really need this!

Thanks,
Nick.

24 Jan 2008, 9:11 AM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Subcategories products in Parent Categories

Firstly, you can't add products to a category, if there are sub-categories in that category.

I would caution against going too deep with the sub-categories trees - your customers will be clicking link after link after link before they got to any meaningful product info. Research shows that more than three clicks to get to a screen that allows a visitor to peform some useful action (like ADD TO CART) usually results in people abandoning a site.

On my sites I try to have a main category, then only go one sub-category deep. Very seldom do I go any deeper on sub-category trees. And some of my sites have upwards of 10000 products with lots of variety.

20 years a Zencart User

25 Jan 2008, 2:55 AM
#4
fightthefourwalls avatar

fightthefourwalls

New Zenner

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

Re: Subcategories products in Parent Categories

Yeah I didnt want to have too deeper subcategories, which is why I am after something like this so the subcategories are just for looking more specifically. I believe it is vital for my site and am really thankful for any help I can get...

BTW, thanks for that info on the clicking business... ill make sure i stick to it where it is needed.

25 Jan 2008, 3:33 AM
#5
cherry_red_boutique avatar

cherry_red_boutique

New Zenner

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

Re: Subcategories products in Parent Categories

I would also love to know how to do this

I haven't had much luck with the linking myself, because you can't like products to a category that has sub-categories

5 Feb 2008, 3:47 AM
#6
fightthefourwalls avatar

fightthefourwalls

New Zenner

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

Re: Subcategories products in Parent Categories

I have found this for OsCommerce: addons.oscommerce.com/info/5351

If anyone knows much about adapting OsCommerce mods for Zen Cart it would be muchly appreciated :smile:

Please help!!!
Thanks,
Nick.

5 Feb 2008, 3:48 AM
#7
fightthefourwalls avatar

fightthefourwalls

New Zenner

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

Re: Subcategories products in Parent Categories

I have found this for OsCommerce: addons.oscommerce.com/info/5351

If anyone knows much about adapting OsCommerce mods for Zen Cart it would be muchly appreciated :smile:

Please help!!!
Thanks,
Nick.

2 Mar 2008, 12:26 PM
#8
focus360 avatar

focus360

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: Subcategories products in Parent Categories

Im looking for the answer to this one. Did you ever find anything?

2 Mar 2008, 10:29 PM
#9
fightthefourwalls avatar

fightthefourwalls

New Zenner

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

Re: Subcategories products in Parent Categories

No not yet... I have been continually trying but there is something I am doing wrong...

These are my guesses of the files to replace the script in:

Step 1:
includes/modules/pages/index/header_php.php

Step 2:
includes/index_filters/default_filter.php

Step 3 & 4:
includes/modules/product_listing.php

Some of these have multiple matches for parts of the code but if you look at the "// text here" tags you will see what they are referenced to and can match it up...

Let me know how u get on.

Cheers,
Nick.

4 Mar 2008, 4:16 AM
#10
molywerks avatar

molywerks

Zen Follower

Join Date:
Aug 2006
Posts:
136
Plugin Contributions:
0

Re: Subcategories products in Parent Categories

Oh, how I do hope to figure out how to do this properly. Would a Zen Cart elder please share the specific file(s) that need editing? It sure would be helpful as a jumping-off point. TIA!

FWIW, my current workaround has been using MySQL and phpMyAdmin to place products within categories having subcategories.

Supposedly, Zen Cart does not like this but I'm unsure why. Regardless, it is possible as I've mentioned. To do it efficiently, what you need to develop is a comprehensive non-Zen database (or spreadsheet with multiple worksheets in my case*) that allows you to quickly export your table values fashioned in the proper MySQL code for easy import into phpMyAdmin.

And I've already written a script to easily fix my products_to_categories table by removing the offending category assignments should I suspect my site is suffering in performance due to this very issue of products listed in categories already having subcategories.

*I have three spreadsheets, one each for products, categories and and manufacturers. I do not do attributes or options. I build whatever I need into each product with custom product table fields. Overboard, yes, but for a reason: portability. Anyway, each worksheet within each spreadsheet is a table with a column for each field. Then in between each column is a column for the MySQl code. This makes it real easy to highlight the worksheet, copy it, paste it into a text editor, and then remove the tabs created between cells. (I recommend JujuEdit from jujusoft.com as it can handle huge files quickly.) Then I copy and paste that into a SQL box on my phpMyAdmin page. Obviously, this is not elegant as it requires a few extra steps, but I believe the effort worth it as I continue to have my doubts about Zen Cart and can quickly move on elsewhere.

BTW, why is Zen Cart not developed for what clearly is desired by much of its user base? Unless the argument is performance-based, there is no reason that this could not be an admin panel on/off switch for there is plenty of research pointing out that when a site is sophisticated and comprehensive in its organization, drill down does not bother a customer in the least.

4 Mar 2008, 5:14 AM
#11
focus360 avatar

focus360

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: Subcategories products in Parent Categories

I would also love some pointers?

My assumption is that it is just two files that would require editing.

the index header_php.php
and default_filter.php

(maybe this is too optimistic - I don't know?)

I've searched all the posts and web. I have found so many people who have come across this problem, but found no solid solution.

5 Mar 2008, 2:01 AM
#12
fightthefourwalls avatar

fightthefourwalls

New Zenner

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

Re: Subcategories products in Parent Categories

Here's what we've all been waiting for! :D

I have found this thread which is exactly what we are after. Here it is: http://www.zen-cart.com/forum/showthread.php?t=83008
It is shown on yellow1912's demo site here: http://demo.rubikintegration.com/zencart/index/c-dvd-movies-3

I tried it but it doesn't seem to work... I have emailed yellow1912 regarding what version of Zen Cart it was build for but considering the thread was started 15th December 2007 it should be fairly recent.
Let me know if any of you have any problems and what your workarounds are.

Cheers,
Nick.

5 Mar 2008, 2:11 AM
#13
focus360 avatar

focus360

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: Subcategories products in Parent Categories

Thanks Nick

I'd searched this user's post several times, but still managed to miss this one!

I'm going to have a look at it now

5 Mar 2008, 2:26 AM
#14
fightthefourwalls avatar

fightthefourwalls

New Zenner

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

Re: Subcategories products in Parent Categories

Your welcome! Let me know how you get on!!!
Cheers.

5 Mar 2008, 4:15 AM
#15
focus360 avatar

focus360

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: Subcategories products in Parent Categories

That module is actually to show all categories and all products on one page. Not to display all products under a parent category.

But from the demo yellow1912 it looks like there is a script that does what we want.

5 Mar 2008, 5:07 AM
#16
fightthefourwalls avatar

fightthefourwalls

New Zenner

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

Re: Subcategories products in Parent Categories

Sorry, I was only emailed that website and in the heat of excitement thought it was that mod... This sounds like it shall do the job too:

http://www.zen-cart.com/forum/showthread.php?t=88215 - (Look at number 5 in that post. I haven't tried it yet but will later tonight or first thing in the morning.

Let me know if that helps...

Cheers.

5 Mar 2008, 7:47 AM
#17
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Subcategories products in Parent Categories

The class already has a function to retrieve all the deepest cats of any category. This is exactly what you need to retrieve all sub-cat products of any parent category. Look into the class. ^^

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

1 Oct 2008, 7:08 PM
#19
sooraj avatar

sooraj

New Zenner

Join Date:
Oct 2007
Location:
singapore
Posts:
25
Plugin Contributions:
0

Re: Subcategories products in Parent Categories

focus360:

Hi yellow1912

Thanks for the post

I have just posted on your thread at:

http://www.zen-cart.com/forum/showthread.php?p=519342#post519342
Hi,
iam also struggling with this ..

How to display sub categories products on same page ?
i tried simple categories tree but not successful..

anyone can help out

13 Oct 2008, 10:58 PM
#20
makenoiz avatar

makenoiz

Zen Follower

Join Date:
Mar 2006
Posts:
284
Plugin Contributions:
0

Re: Subcategories products in Parent Categories

Me too. I dont just want the text links at the top. I want to show the products, grouped by subcat

22 stores and counting! Ive been zenned.