Skip to content

Instantly share code, notes, and snippets.

@goodwoor
Created February 14, 2022 07:03
Show Gist options
  • Save goodwoor/537f8df6a2db789f1d16178455163ab0 to your computer and use it in GitHub Desktop.
Save goodwoor/537f8df6a2db789f1d16178455163ab0 to your computer and use it in GitHub Desktop.
diff --git a/app/functions/fn.products.php b/app/functions/fn.products.php
index c250e14c76..b54a12208e 100644
--- a/app/functions/fn.products.php
+++ b/app/functions/fn.products.php
@@ -1331,18 +1331,6 @@ function fn_update_product($product_data, $product_id = 0, $lang_code = CART_LAN
$_data['min_qty'] = 0;
}
- if (Registry::get('settings.General.allow_negative_amount') == 'N'
- && isset($_data['amount'])
- && (int) $_data['amount'] < 0
- && (
- isset($_data['out_of_stock_actions'])
- && $_data['out_of_stock_actions'] !== OutOfStockActions::BUY_IN_ADVANCE
- )
- ) {
- /** @var int $_data['amount'] */
- $_data['amount'] = 0;
- }
-
$shipping_params = array();
if (!empty($product_info['shipping_params'])) {
$shipping_params = unserialize($product_info['shipping_params']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment