Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / How to mark all products out of stock at once?

How to mark all products out of stock at once?

Started by joecooper on 27 Jul 2015, 2:40 PM · Views: 713

Results 1 to 6 of 6
27 Jul 2015, 2:40 PM
#1
joecooper avatar

joecooper

Zen Follower

Join Date:
Aug 2011
Posts:
122
Plugin Contributions:
0

Post #1 by joecooper

My sister runs a site, but has now gone on holiday for 6 weeks. We need to mark all products as "Out of Stock". Rather than go through all 100+ products, we want to do it at the database level.

Which table / field controls this option?

Note: We don't want to take the site down, just prevent orders. Also we don't want to mark stock as 0, just the "Out of Stock" option that's on the product editor page.

27 Jul 2015, 2:54 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,153
Plugin Contributions:
56

Post #2 by lat9

You could also turn the store into a showcase (Configuration->My Store->Store Status->2) which prevents orders and doesn't mess with the products' current stock levels.

27 Jul 2015, 8:49 PM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,769
Plugin Contributions:
56

Post #3 by swguy

What about turning off all shipping / payment modules instead?

OR what about leaving things as is and just making statements on the home page/shopping cart/checkout pages that orders will take 6 weeks to process.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

27 Jul 2015, 9:01 PM
#4
patclay avatar

patclay

New Zenner

Join Date:
Dec 2008
Location:
New Zealand
Posts:
88
Plugin Contributions:
1

Post #4 by patclay

When I have done this in the past, I made a big banner saying I would be away until x date & would ship anything then & had it display at the top of each page.

People did order while I was away.

Why lose all of the revenue when you don't need to? You would need to explain to people browsing the store why everything is out of stock anyway.

However to answer your question:

The table 'products' has a column 'products_status' 0 is disabled. You might want to look at how 'products_date_available' works too.

Cheers

Pat

27 Jul 2015, 10:11 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #5 by mc12345678

PatClay:

However to answer your question:

The table 'products' has a column 'products_status' 0 is disabled.

In a standard ZC this would effectively make the product disappear and not show at all. (Disable/Product out-of-stock on the product information pagem)

PatClay:

You might want to look at how 'products_date_available' works too.

Cheers

Pat

This last one is for making disabled product active (in stock as seen on the product information entry page).

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

1 Mar 2016, 12:58 AM
#6
elemi avatar

elemi

Zen Follower

Join Date:
Mar 2006
Location:
Auckland, New Zealand
Posts:
242
Plugin Contributions:
0

Post #6 by elemi

Thanks for this thread.

I'll be away for 3 months in Europe and my store will be closed for 5 months as everything is going into storage. I've just tested my v1.3.7 cart to do the following:
Store Status = 2 (then everyone can still see the info and prices)
"Contact Us" I found in Includes>Languages>English.php line 511 and now reads

define('TEXT_SHOWCASE_ONLY','Thank you for your interest. We are closed until September as we are in Europe.</br> If you are not already registered with us, please do so as we will send out an email when we return and reopen. </br>You can also follow our journey on our Facebook page.');

That was a really quick and easy solution and will take the push of 2 buttons to turn it all back on again when we get home.

Tania :-)

Elemi

The Art of Bespoke Aromatherapy
https://www.AmorAromatherapy.co.nz