Forums / Templates, Stylesheets, Page Layout / Categories with Zero Products

Categories with Zero Products

Locked

Views: 1,960

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
11 Oct 2007, 4:55 PM
#1
bond avatar

bond

New Zenner

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

Categories with Zero Products

Hello everyone, I'm new to the zen community. I initially had oscommerce installed on my web server, but after I research the two, I decided to uninstall it and go with zen. So far, I like it!:smile:

My first question: I need to hide any category with zero products. Does anyone know how I can accomplish that?

Thanks!!

11 Oct 2007, 5:03 PM
#2
nomadrw avatar

nomadrw

Zen Follower

Join Date:
Sep 2007
Location:
Somewhere in Southern Cal
Posts:
331
Plugin Contributions:
0

Re: Categories with Zero Products

Hello bond
and welcome to zen
to hide any products or catalogs that zen has product you will need to goto
admin>catalog>Categories / Products
you will see seveal catalogs and products in order to disable the info look for the Status in the header.
ie
ID Catagories / Products Models
once you find that you will either see a green or red button (red turns off or disables the product or Catagories. So just click on the green button and follow the directions on the next window.
That's it.

nomad

11 Oct 2007, 5:11 PM
#3
bond avatar

bond

New Zenner

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

Re: Categories with Zero Products

Thanks! That was easy!

3 Feb 2009, 2:49 AM
#4
edwardtilbury avatar

edwardtilbury

Zen Follower

Join Date:
Sep 2007
Posts:
169
Plugin Contributions:
0

Re: Categories with Zero Products

any way to accomplish this dynamically? What if we have thousands of categories?

thanks!

AIM edwardtilbury
GoogleTalk edwardtilbury

18 Feb 2009, 5:34 PM
#5
bodyjewelrystores avatar

bodyjewelrystores

Zen Follower

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

Re: Categories with Zero Products

edwardtilbury:

any way to accomplish this dynamically? What if we have thousands of categories?

thanks!

I second this question

On our store, we hide everything which goes out of stock, and then reactivate the products as soon as they're back - and I do it all with Easy Populate - so, categories sometimes become "empty" and I won't even notice it. We do have hundreds of categories, so checking all of them and hiding them manually on each stock update is not an option.

We need to have a way to automatically and dynamically hide all categories with 0 active products - and to unhide them again as soon as any product becomes active.

Any ideas?

18 Feb 2009, 9:26 PM
#6
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Categories with Zero Products

Since you're already using Easy Populate, and presumably create and maintain your base data in Excel or a similar program, you could automate the process somewhat by using Visual Basic within Excel. But of course, this would mean you'd always be deleting and creating categories as needed rather than just turning them off and on, and I'm not sure EP can delete categories during uploads -- create yes, but maybe not delete.

Rob

Breakfast: the most important donut of the day.

18 Feb 2009, 9:45 PM
#7
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Categories with Zero Products

I believe the question being asked is different from the original question. Zero products is a different situation than products with zero stock. The category still has products in that case. I don't think there's a way to automate that unless it might involve a very complex SQL statement... maybe.. :shocking:

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

19 Feb 2009, 12:04 AM
#8
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Categories with Zero Products

Good point Mary Ellen. I missed that distinction entirely.

But they might want to look into this coincidental thread.

Rob

Breakfast: the most important donut of the day.

19 Feb 2009, 12:08 AM
#9
bodyjewelrystores avatar

bodyjewelrystores

Zen Follower

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

Re: Categories with Zero Products

rstevenson:

Since you're already using Easy Populate, and presumably create and maintain your base data in Excel or a similar program, you could automate the process somewhat by using Visual Basic within Excel. But of course, this would mean you'd always be deleting and creating categories as needed rather than just turning them off and on, and I'm not sure EP can delete categories during uploads -- create yes, but maybe not delete.

Rob

Well, I'm not really maintaining the whole thing with excel/easy populate - I just use it when adding new products and changing stock status. There are a lot of things EP doesn't do, or doesn't do well (most annoyingly - sort orders, and item attributes, but also category management as you noted above), and sometimes I can complete the picture with some SQL queries, but for this I'd need something more dynamic.

However, your post got me thinking.... maybe there's a way to add a little routine to Easy Populate's php scripts, which would run after an EP file has been uploaded, loop through all the categories, count the active items, and change the category status accordingly. Could be a nasty bit of code-crunching (for me) but might work....

19 Feb 2009, 12:15 AM
#10
bodyjewelrystores avatar

bodyjewelrystores

Zen Follower

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

Re: Categories with Zero Products

afo:

I believe the question being asked is different from the original question. Zero products is a different situation than products with zero stock. The category still has products in that case. I don't think there's a way to automate that unless it might involve a very complex SQL statement... maybe.. :shocking:

I'm thinking something along the lines of the product count in the category sidebox (when zero-stock products are hidden).... that one makes no distinction between active products and total products. For any category with products, the customer would see "0" as long as they're all zero-stock and/or with a status of 0. So, since there's already a routine in Zen Cart that works like that, maybe I could use the same principle in letting it set the category's status accordingly...

19 Feb 2009, 4:20 AM
#11
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Categories with Zero Products

bodyjewelrystores:

I'm thinking something along the lines of the product count in the category sidebox (when zero-stock products are hidden).... that one makes no distinction between active products and total products. For any category with products, the customer would see "0" as long as they're all zero-stock and/or with a status of 0. So, since there's already a routine in Zen Cart that works like that, maybe I could use the same principle in letting it set the category's status accordingly...

There might be. When I read this thread earlier today (long before I posted), I poked around in the admin to see if there was a setting. I doubt the existing setting puts that fine a point on it, but I suppose someone far more experienced with the behind the scenes workings of ZC could write a mod to do this. Could be something for the devs to consider for future releases.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

19 Feb 2009, 4:35 AM
#12
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Categories with Zero Products

It occurred to me that a better term for this situation would be a category with inactive products instead of zero products. It better describes the current topic of the thread.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey