liuksas Posted February 25 Share Posted February 25 hello, pls help, what command to enter in SQL to enable all products whose stock is more than 0 ? Link to comment Share on other sites More sharing options...
Nickz Posted February 25 Share Posted February 25 I suggest to make a back up first. At least the Database over PhpMyAdmin. Do you know your way around databases and SQL? Link to comment Share on other sites More sharing options...
liuksas Posted February 25 Author Share Posted February 25 yes I know, but I don't know how to activate all the products with stock more 0 Link to comment Share on other sites More sharing options...
Daresh Posted February 25 Share Posted February 25 Check out the Tidy module, it has activating in stock products as one of the many many features 1 Link to comment Share on other sites More sharing options...
Andrei H Posted February 25 Share Posted February 25 Hello, The following SQL update query should do the trick for you: UPDATE `ps_product_shop` PS, `ps_stock_available` SA SET PS.`active` = '1' WHERE PS.`id_product` = SA.`id_product` AND SA.`quantity` > 0; This is not taking into account the store. If you run a multistore environment and want to update only a single store, you will have to add an additional check for that. 1 Link to comment Share on other sites More sharing options...
Prestashop Addict Posted February 26 Share Posted February 26 Il y a 23 heures, liuksas a dit : hello, pls help, what command to enter in SQL to enable all products whose stock is more than 0 ? For SEO, it is not recommended to deactivate product just because you don't have stock. You loose at least ranking 😞 1 Link to comment Share on other sites More sharing options...
liuksas Posted February 27 Author Share Posted February 27 its working thanks for help Andrei H 😀 the problem is that I need to transfer 20k products and I split the xml into parts and when several parts are turned off all the other products... but now I know the SQL command to turn them all on 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now