Jump to content

SQL Statement to disable out of stock products


Recommended Posts

Hi there,

Can someone help me with a SQL statement so I can disable all products which are out of stock in the warehouse.

There is only one warehouse and all shops (multistore) are configured to use the sock from this warehouse.

I need something like:

 

Set all products enabled = 0 where stock in warehouse <=1

 

Thanks in advance.

 

I know SQL ok, but Im quite new to prestashop and I am not too sure of the schema....

 

 

 

Link to comment
Share on other sites

You only want to run this once? If not, wouldn't it be better if you setup a MySQL trigger to take care of it automatically?

 

http://mypresta.eu/en/art/tips-and-tricks/how-to-disable-out-of-stock-product.html

 

Check this related topic: http://www.prestashop.com/forums/topic/258359-how-to-hide-out-of-stock-products-in-prestashop-1541

Edited by parsifal (see edit history)
Link to comment
Share on other sites

  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...