Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Out of Stock, question?


CentralScooters

Recommended Posts

If i have a product out of stock.

How does the customer find out that it is out of stock?

Will it say "Sorry out of stock" when the customer presses the buy button?

Sorry to bother you people, i am knew, and barely know HTML, so i don't know how to use and install OScommerce. ;)

Link to comment
Share on other sites

Kind of depends on how you configure your shop in the Admin.

 

If you have it set to allow sales of out of stock, then when they try to buy it in the cart it will have some *** with a note out of stock.

 

If you do not modify the files and the last one sells it goes out of stock or the status is set to not show the product when you are tracking stock.

 

You can modify the code so that this does not set the product to status of 0 by editing the checkout_process.php file:

 

      if ($stock_left < 1) {

       tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

     }

 

You can either change that to being commented out so it does not happen or set the stock to a value such as 0 or 1 and decide how you want that treated.

 

This way, you can track stock levels but when you hit 0 it does not disable the product and will warn the buyer you are out of stock but they still have an option to buy it. Or, let it change the value to a negative number but not set the status to 0 so you can still keep track of stock even when you get low or out of stock.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...