PrestaQvisten Posted January 22 Share Posted January 22 (edited) Hi, i have a question about product stock for my prestashop. I use 8.2.0 I want all my products by default so that they can be ordered, even if they are out of stock. But some products i have on my Outlet/Sale category i need to add quantity, so my customer only can order the quantity i have for those specific products and when they are sold out they can't be ordered anymore. Is there any way to do this setting? Edited March 7 by PrestaQvisten (see edit history) Link to comment Share on other sites More sharing options...
Daresh Posted January 22 Share Posted January 22 Sure, you have settings to allow ordering out of stock products: Link to comment Share on other sites More sharing options...
Knowband Plugins Posted January 22 Share Posted January 22 Hi, You can change the settings for all products using below queries- 1. Set all products to allow ordering when out of stock by default. UPDATE stock_available SET out_of_stock = 1; 2. Restrict Products in the "Outlet/Sale" Category UPDATE stock_available AS sa JOIN ps_category_product AS cp ON sa.id_product = cp.id_product JOIN ps_category_lang AS cl ON cp.id_category = cl.id_category SET sa.out_of_stock = 0 WHERE cl.name = 'Outlet' OR cl.name = 'Sale'; Kindly change the name of the categories as per your need. Regards Link to comment Share on other sites More sharing options...
PrestaQvisten Posted January 22 Author Share Posted January 22 On 1/22/2025 at 7:23 AM, Daresh said: Sure, you have settings to allow ordering out of stock products: Expand Hi, do i need to have the stock management activated if i want to use this method? Link to comment Share on other sites More sharing options...
Daresh Posted January 22 Share Posted January 22 Yes you do. 1 Link to comment Share on other sites More sharing options...
PrestaQvisten Posted January 27 Author Share Posted January 27 On 1/22/2025 at 1:17 PM, Knowband Plugins said: Hi, You can change the settings for all products using below queries- 1. Set all products to allow ordering when out of stock by default. UPDATE stock_available SET out_of_stock = 1; 2. Restrict Products in the "Outlet/Sale" Category UPDATE stock_available AS sa JOIN ps_category_product AS cp ON sa.id_product = cp.id_product JOIN ps_category_lang AS cl ON cp.id_category = cl.id_category SET sa.out_of_stock = 0 WHERE cl.name = 'Outlet' OR cl.name = 'Sale'; Kindly change the name of the categories as per your need. Regards Expand HI, where do i use the SQL queries. Where in admin can i use that? do i need a module or do i go in to my CPanel for my homepage? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted January 28 Share Posted January 28 Hi, You can execute the SQL queries directly through the cPanel for your store. However, please ensure you take a backup of your database before running the queries to avoid any data loss. Regards. Link to comment Share on other sites More sharing options...
PrestaQvisten Posted January 28 Author Share Posted January 28 On 1/28/2025 at 1:24 PM, Knowband Plugins said: Hi, You can execute the SQL queries directly through the cPanel for your store. However, please ensure you take a backup of your database before running the queries to avoid any data loss. Regards. Expand Okay thanks! 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