Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Not displaying out of stock products


Guest

Recommended Posts

A while back I got the great idea that it would be cool to not even show products that are out of stock....but the more I think about it, it's not worth it. I know it's an easy setting but I don't know where to look to make it so that out of stock items simply read "Out of Stock" as opposed to being taken off the site entirely.

 

Any help?

Link to comment
Share on other sites

Been looking for a solution too. I was digging around this morning and came across some code in shopping_cart.php. There's a few lines of code around line 121 that goes like this:

 

$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);

if (tep_not_null($stock_check)) {

$any_out_of_stock = 1;

 

$products_name = $products_name.'     '.$stock_check ;

}

 

It basically calls the function tep_check_stock() to see if the item is out of stock.

 

I think something can be built out of this. I'm not no php guru, but if there isn't already a solution available, it looks like I may have to code. :rolleyes: Brings back the good old days yes.

 

"There is no try. There is only do or do not." - Yoda

Link to comment
Share on other sites

That isn't exactly what i was talking about. It was something simple. I am in no way a PHP guru and at the time I changed this setting i was even worse then I am now...is it a stock feature then to remove items that are out of stock? Now i am really confused.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...