theseason Posted June 26, 2004 Posted June 26, 2004 When a product is purchased on our site, the site will decrease the quanity. However, when the quantity left is zero, it will not change the product status to out of stock so that the product will be removed from display. Here are my settings in the stock admin menu: check stock level true subtrack stock true allow checkout false mark out of stock *** Most of the products are unique and have only one item available. What should I do? I am using the Paypal IPN contribution as well. Thanks for the help in advance *theseason
Acheron Posted June 26, 2004 Posted June 26, 2004 I believe that is how the default osC functions. If you would like it to check stock before displaying an item, you would need to add some code so it doesn't display if stock < 1
theseason Posted June 26, 2004 Author Posted June 26, 2004 So, oscommerce by default, will not change the status of an item automatically. That seems backwards. I have no idea of where or how to add code so that the product will not display in the list if there is no stock. Thanks for the info. *theseason
Acheron Posted June 30, 2004 Posted June 30, 2004 I know this isn't exactly what you want but if you haven't sorted it yet, maybe this can provide a temporary fix
Guest Posted July 2, 2004 Posted July 2, 2004 Try this... In checkout_process.php find... tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); Immediately after that insert... if ($stock_left < 1) { tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); } this is from a july 2003 release of OSC if yours is no longer using tep then just replace function name as required. Might Help :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.