Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Oct 2007
    Posts
    2
    Plugin Contributions
    0

    Default 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!

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

    Thanks!!

  2. #2
    Join Date
    Sep 2007
    Location
    Somewhere in Southern Cal
    Posts
    330
    Plugin Contributions
    0

    Default 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

  3. #3
    Join Date
    Oct 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: Categories with Zero Products

    Thanks! That was easy!

  4. #4
    Join Date
    Sep 2007
    Posts
    166
    Plugin Contributions
    1

    Default Re: Categories with Zero Products

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

    thanks!

  5. #5
    Join Date
    Jun 2006
    Posts
    123
    Plugin Contributions
    0

    Default Re: Categories with Zero Products

    Quote Originally Posted by edwardtilbury View Post
    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?

  6. #6
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default 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

  7. #7
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default 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..
    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

  8. #8
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default 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
    Last edited by rstevenson; 19 Feb 2009 at 01:08 AM. Reason: added other thread link

  9. #9
    Join Date
    Jun 2006
    Posts
    123
    Plugin Contributions
    0

    Default Re: Categories with Zero Products

    Quote Originally Posted by rstevenson View Post
    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....

  10. #10
    Join Date
    Jun 2006
    Posts
    123
    Plugin Contributions
    0

    Default Re: Categories with Zero Products

    Quote Originally Posted by afo View Post
    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..
    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...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. products with attributes set to zero
    By skorbay in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 19 Jan 2011, 06:29 AM
  2. Products with zero quantity showing as Sold Out
    By miguel991 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 22 Dec 2010, 09:36 PM
  3. Replies: 5
    Last Post: 19 Nov 2006, 05:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg