Jump to content

[SOLVED]Making products disappear from the list when unavailable


Recommended Posts

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

×
×
  • Create New...