Jump to content

How to remove out of stock products?


Recommended Posts

Hello

 

This problem is getting very urgent for me, now it is the last thing before my shop goes live.

Dos anybody have any idea how to do it? I have so many products that is just 1 and 1 and they can be out of stock for a year so I cant have them there.

 

Urgent help is needed ( I tried the mysql way but it did not work for me to old mysql ore something like that.)

Link to comment
Share on other sites

you want to remove them or just deactive them?

 

if you want to deactive, check this tuorial: disable out of stock products

you can also run query (without creating own triggers)

UPDATE ps_product_shop SET active=1 WHERE id_product IN (SELECT id_product FROM ps_stock_available WHERE quantity<=0);

 

 

 

to remove products use query:

DELETE FROM ps_product_shop WHERE id_product IN (SELECT id_product FROM ps_stock_available WHERE quantity<=0);

 

 

remember about backups!

Link to comment
Share on other sites

ok the tuorial is the one I have tested and the mysql version I have on the server did not support it.

 

I will test the other option and it is disabel that I want not remove.

 

Thank you

Link to comment
Share on other sites

  • 9 months later...
×
×
  • Create New...