Tobiel Posted April 25, 2004 Posted April 25, 2004 Hi guys, Everytime someone buys a product in my online store, and thus the product gets out of stock, oscommerce automatically sets it on "out of stock" and thus removes it from the shop. I can ofcourse manually put it on stock again, with the quantity 0, but I'd like oscommerce to just put it at 0 instead of removing it, so that people can always view all my products... I hope you understand my problem and that you have a solution for me, as this is quite important for ym webshop.
♥yesudo Posted April 25, 2004 Posted April 25, 2004 In checkout_process.php try: Find: if ((DOWNLOAD_ENABLED != 'true') || (!$stock_values['products_attributes_filename'])) ? ? ? { ? ? ? ? ?$stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty']; and after add: If ($stock_left < 0) { $stock_left = 0; } And change: if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) { To: if ( ($stock_left < 0) && (STOCK_ALLOW_CHECKOUT == 'false') ) { Your online success is Paramount.
Tobiel Posted April 25, 2004 Author Posted April 25, 2004 Thank you soooooooooo very much really, this worked perfectly! Thanks again, I REALLY appreciate this! :D
helply Posted August 10, 2004 Posted August 10, 2004 anyway to get this to not show an add to cart button if the product is out of stock. I too want the products to stay online even when out of stock, but I dont want customers to be able to order them. thanks
♥yesudo Posted August 10, 2004 Posted August 10, 2004 look at the sold out contrib in my signature. Your online success is Paramount.
♥yesudo Posted August 10, 2004 Posted August 10, 2004 Contrib update: Addition(correction) to query in products_new.php. Your online success is Paramount.
jasonbrice Posted September 6, 2004 Posted September 6, 2004 Hi, I'm editing product_info.php (v 1.97) and I can't find the code: <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> So I can edit it to: <?php if ($product_info['products_quantity'] > 0) { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } ?> Am I looking in the wrong file, or do I have an outdated version of product_info.php? Any help is appreciated! Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.