Jump to content

Hide 'out-Of-Stock' Products


zklid

Recommended Posts

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

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...