SanderF Posted February 19, 2011 Share Posted February 19, 2011 Is it possible to make products invisible automatically when the stock reaches 0? If so, how do I do this?Thanks Link to comment Share on other sites More sharing options...
shokinro Posted February 19, 2011 Share Posted February 19, 2011 As long as I know, there is no place that you can configuration this. But there is a way by changing code to implement this. It is not recommended, if you really want to do that, here is how to do this.In /classes/Category.php file, find following line in function getProducts() WHERE cp.`id_category` = '.intval($this->id).($active ? ' AND p.`active` = 1' : '').' Replace above line with following line WHERE p.quantity>0 AND cp.`id_category` = '.intval($this->id).($active ? ' AND p.`active` = 1' : '').' Please make a copy before make any changes.Again it is not recommended to do this. Because you will forget what you have done later. Link to comment Share on other sites More sharing options...
SanderF Posted February 19, 2011 Author Share Posted February 19, 2011 Thanks, I'll test this Link to comment Share on other sites More sharing options...
Recommended Posts