globalcrafts Posted March 7, 2005 Share Posted March 7, 2005 Hi I have spent a couple of hours searching for this and I can not find what I need , please help. I have just upgraded to 2.2 from 2.1 the old installation used to automatically take the product to out of stock and remove the listing from the catalog if the qty went to 0 i.e. as I sold the last one. The new installation does subtract the stock from qty but does not change the status when it gets to 0. I know I must be missing something. I also realise that the stock options allow me to prevent checkout / mark the item as out of stock etc, but I need the item to automatically come offline. Thanks in advance any hints would be great. Kevin Link to comment Share on other sites More sharing options...
globalcrafts Posted March 7, 2005 Author Share Posted March 7, 2005 I found a solution which seems to work: In catalog/checkout_process.php find if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) { tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); } } } and change false to true. This allows a customer to buy more than you have in stock, which I wanted, but will remove the item from stock when it gets below 1, thus one of a kind items in my system are removed. Hi I have spent a couple of hours searching for this and I can not find what I need , please help. I have just upgraded to 2.2 from 2.1 the old installation used to automatically take the product to out of stock and remove the listing from the catalog if the qty went to 0 i.e. as I sold the last one. The new installation does subtract the stock from qty but does not change the status when it gets to 0. I know I must be missing something. I also realise that the stock options allow me to prevent checkout / mark the item as out of stock etc, but I need the item to automatically come offline. Thanks in advance any hints would be great. Kevin <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.