Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Suppress display item where stock level = 0

Suppress display item where stock level = 0

Locked

Views: 1,961

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
11 Jan 2008, 12:04 PM
#1
el_keef avatar

el_keef

New Zenner

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

Suppress display item where stock level = 0

How can I Actually not show an item where stock level = 0?

I have an application where there is a potentially large list of collectable items that are sourced as available. I'd like them to appear when stock level >0 and not be displayed where I no longer have examples available.
All attributes of an product item ( like images) will still be applicable if I source another in 6 months time, so I want to control the store by incrementing stock levels for items when examples are found.

I don't want customers to browse and click through pages of items to be told that each one is . . . . . not available

11 Jan 2008, 12:21 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Suppress display item where stock level = 0

admin > config > stock > Products status in Catalog when out of stock should be set to > set to "0"

11 Jan 2008, 1:09 PM
#3
el_keef avatar

el_keef

New Zenner

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

Re: Suppress display item where stock level = 0

Thanks, that's the settings I had already.

I now know that as this only works for stock levels hitting zero after being decremented by real sales (rather than product items entered with zero stock), I have to set products_status manually by running an update statement:

UPDATE products SET products_status = 0 WHERE products_quantity <= 0;

This finally gives me the action I need, this does hide the product from listing as I required - HOWEVER:

It doesn't stop it appearing in the "new for this month" list - as it was recently added. Can I suppress zero stock items from this listing?

11 Jan 2008, 1:22 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Suppress display item where stock level = 0

Kinda a work around and requires that you are comfortable with phpmyadmin(always backup first) -

First set admin > config > maximum Values > New Product Listing - Limited to ... > set to 7 days

Now edit the DB products table for date added and make them older than 7 days

25 Jan 2008, 1:18 AM
#5
djreda avatar

djreda

New Zenner

Join Date:
Jan 2008
Location:
New Jersey
Posts:
14
Plugin Contributions:
0

Re: Suppress display item where stock level = 0

Hi All,

To take this question one step further....in addition to hiding items when they are out of stock can categories and / or subcategories be set to not show when there are either no items or no in-stock items in a given cat/subcat?

I would REALLY appreciate some help on this one as I'm setting up a childrens consignment shop and the sizes will be constantly fluctuating.

Thanks in advance! :clap:

Dominick :cool: