From ae5b6b79ee14fd7043f8f2a38addf83cb139d753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Nadaud?= Date: Tue, 16 Jul 2013 17:42:38 +0200 Subject: [PATCH] [*] BO : #PSCFV-8498 You can now use 0% in groups category rules in order to not apply discount on this category --- classes/Product.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/Product.php b/classes/Product.php index 28189ded4..fbfc0d323 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -2699,8 +2699,10 @@ class ProductCore extends ObjectModel // Group reduction if ($use_group_reduction) { - if ($reduction_from_category = (float)GroupReduction::getValueForProduct($id_product, $id_group)) - $price -= $price * $reduction_from_category; + $reduction_from_category = GroupReduction::getValueForProduct($id_product, $id_group); + + if (!empty($reduction_from_category)) + $price -= $price * (float)$reduction_from_category; else // apply group reduction if there is no group reduction for this category $price *= ((100 - Group::getReductionByIdGroup($id_group)) / 100); }