From f9903edcc88bb6c86171ef4b648c0968bacb2bf7 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 29 Oct 2023 16:57:01 +0100 Subject: [PATCH] Update product.php --- functions/product.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/product.php b/functions/product.php index 2a8ec4f4..3932aa8e 100644 --- a/functions/product.php +++ b/functions/product.php @@ -110,8 +110,10 @@ function doliProductStock($product, $refresh = false, $nohtml = false, $array_op } else { $mstock['stock'] = 0; } - } else { + } elseif (isset($product->stock_theoriqu) && isset($product->stock_reel)) { $mstock['stock'] = min(array($product->stock_theorique,$product->stock_reel)); + } else { + $mstock['stock'] = 99; } if (isset($product->array_options->options_packaging) && !empty($product->array_options->options_packaging)) { $mstock['step'] = $product->array_options->options_packaging;