Jump to content
Latest News: (loading..)

Search the Community

Showing results for tags 'restock product quantity zero status'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News and Announcements
    • News and Announcements
    • Partner Announcements
    • Ambassadors
  • Commercial Support
    • Developer Feedback
  • osCommerce Online Merchant v2.x
    • General Support
    • Installation and Configuration
    • Upgrading from Earlier Versions (v2.x to v2.x)
    • Add-Ons
    • Tips and Tricks
    • Security
  • Development
    • osCommerce Online Merchant v2.4
    • osCommerce Online Merchant Community Bootstrap Edition
    • osCommerce Online Merchant v3.x
    • Development Proposals
  • General
    • OSCOMMERCE.TV
    • Next Steps / Optimizations / Marketing
    • Live Shop Reviews
    • E-Commerce Laws
    • General Discussions
    • PHP / SQL / Web Design
  • oscBooks and oscTemplates's Announcements
  • Mini Template System's Announcements
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements

Found 1 result

  1. Not sure if this has been discussed before, I didn't find anything. Scenario: Check stock level and Subtract stock is set to true An order is placed which reduces product stock to zero and turns product status to false This order is deleted in admin with the checkbox " Restock product quantity " ticked Products stock is correct restocked to the quantity before this order Product status is still in false Shouldn't the product status also be resetted to "true" in that case or at least a checkbox and condition added "switch product status to true" The code modification (without additional checkbox and condition) would be: in: admin/includes/functions/general.php within the "tep_remove_order" function: change: tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity + " . $order['products_quantity'] . ", products_ordered = products_ordered - " . $order['products_quantity'] . " where products_id = '" . (int)$order['products_id'] . "'"); to: tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity + " . $order['products_quantity'] . ", products_ordered = products_ordered - " . $order['products_quantity'] . ", products_status = (IF(products_quantity + " . $order['products_quantity'] . " > 0, 1, 0)) where products_id = '" . (int)$order['products_id'] . "'");
×