diff --git a/modules/loyalty/LoyaltyModule.php b/modules/loyalty/LoyaltyModule.php index d88f1da8..12ee5e3f 100755 --- a/modules/loyalty/LoyaltyModule.php +++ b/modules/loyalty/LoyaltyModule.php @@ -156,7 +156,7 @@ class LoyaltyModule extends ObjectModel if ($currency->conversion_rate) $price = $price / $currency->conversion_rate; } - $discount_value = (float)(Configuration::get('PS_LOYALTY_PERCENT_VALUE') * $price) / 100; + $discount_value = (float)(((float)Configuration::get('PS_LOYALTY_PERCENT_VALUE') * $price) / 100); return $discount_value; } @@ -195,7 +195,7 @@ class LoyaltyModule extends ObjectModel public static function getAllByIdCustomerCustom($id_customer, $id_lang, $onlyValidate = false, $pagination = false, $nb = 10, $page = 1, $onlyDefault = false) { - $percent = (float)(1.75 / 100); + $percent = (float)(Configuration::get('PS_LOYALTY_PERCENT_VALUE') / 100); $query = ' SELECT f.id_order AS id, f.date_add AS date,