thunderbats Posted March 11, 2005 Share Posted March 11, 2005 Let's say that I only have 10 of an item and I want osCommerce to mark it out of stock after 10 are bought, how do I do that? Do I need a module or is there a feature that I'm overlooking? Thanks in advance. Link to comment Share on other sites More sharing options...
♥FIMBLE Posted March 11, 2005 Share Posted March 11, 2005 Let's say that I only have 10 of an item and I want osCommerce to mark it out of stock after 10 are bought, how do I do that? Do I need a module or is there a feature that I'm overlooking? Thanks in advance. <{POST_SNAPBACK}> Hi This is a contribution i use and it works fine! Whe you get to your minimum stock level it will send you an email. Though it will only work if you set your restock level overall to zero Contribution written by: Emmett Brosnan ? ( yesUdo.com ) Jai Karania ? ( kynet.co.uk ) File: checkout_process.php Add: // Version: 02-20-04 (BOF) 02/20/2004 - Low Stock Level Email Author: Emmett (yesUdo.com) and Jai (kynet.co.uk) $warning_stock = STOCK_REORDER_LEVEL; $current_stock = $stock_left; // Jai @ kynet.co.uk made the following change on 20-02-04 // Dynamic store url - Replaced [' http://www.YOURDOMAIN.com/] with [. HTTP_SERVER . DIR_WS_CATALOG . '] $low_stock_email = '<b>Low stock warning:</b> ' . $order->products[$i]['name'] . "\n" . '<b>Model No.:</b> ' . $order->products[$i]['model'] . "\n" . '<b>Quantity:</b> ' . $stock_left . "\n" . '<b>Product URL:</b>' . HTTP_SERVER . DIR_WS_CATALOG . 'product_info.php?products_id='. $order->products[$i]['id'] . "\n\n" . '<b>Current Low order limit is ' . $warning_stock . ' units</b>'; $low_stock_subject = 'Low Stock Warning: ' . $order->products[$i]['name']; if ($current_stock <= $warning_stock) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $low_stock_subject, $low_stock_email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } // (EOF) 02/20/2004 - Low Stock Level Email Author: Emmett (yesUdo.com) and Jai (kynet.co.uk) After: if ((DOWNLOAD_ENABLED != 'true') || (!$stock_values['products_attributes_filename'])) { $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty']; Notes: STOCK_REORDER_LEVEL is set in your admin area configuration/stock/Stock Re-order level THAT?S IT!! Sometimes you're the dog and sometimes the lamp post [/url] My Contributions Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.