zklid Posted July 7, 2023 Share Posted July 7, 2023 Hi, could you help me figure out which query I need to use to do this: assign quantity 0 to all products that have inactive status in the prestashop catalog. I use prestashop 1.6. Thanks to those who will help me Link to comment Share on other sites More sharing options...
ps8modules Posted July 8, 2023 Share Posted July 8, 2023 Hi, UPDATE ps_stock_available t1 INNER JOIN ps_product AS t2 ON t2.id_product = t1.id_product SET t1.quantity = 0 WHERE t2.active = 0; Link to comment Share on other sites More sharing options...
zklid Posted July 10, 2023 Author Share Posted July 10, 2023 On 7/8/2023 at 6:01 AM, ps8moduly.cz said: Hi, UPDATE ps_stock_available t1 INNER JOIN ps_product AS t2 ON t2.id_product = t1.id_product SET t1.quantity = 0 WHERE t2.active = 0; Thanks for your help. I have only one doubt regarding the main table of products in prestashop 1.6: the table to take into consideration is ps_product (like you did) or ps_product_shop? Link to comment Share on other sites More sharing options...
ps8modules Posted July 10, 2023 Share Posted July 10, 2023 (edited) Hi, there is an active column in both tables. The ps_product_shop table is mainly used for multistore. Edited July 10, 2023 by ps8moduly.cz (see edit history) 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