zklid Posted December 16, 2015 Share Posted December 16, 2015 Hi, is possible to hide 'Out-of-stock' products with a query in the prestashop database? And I can do the same for products without photos?Can someone help me Link to comment Share on other sites More sharing options...
-=peter=- Posted December 16, 2015 Share Posted December 16, 2015 Yes you can turn them off. You can also modify the code to hide them, but I got some problems, with it. Don't forget to backup your db! To deactivate products with quantity <=0 and simple stock management you can exec: update ps_product p, ps_product_shop ps, (select id_product, sum(sa.quantity) qty from ps_stock_available sa where sa.id_product_attribute<>0 group by (sa.id_product)) zqty set p.active=0, ps.active=0 where p.id_product=zqty.id_product and ps.id_product=zqty.id_product and zqty.qty<=0; commit --maybe.. 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