[+] Project : adding Features detachables in order to improve performance

// clean code
This commit is contained in:
aFolletete
2011-09-03 17:21:32 +00:00
parent a4491c9897
commit 230bebc7c7
51 changed files with 1081 additions and 419 deletions

View File

@@ -88,10 +88,10 @@ class ReferralProgramModule extends ObjectModel
$discount->id_discount_type = (int)$configurations['REFERRAL_DISCOUNT_TYPE'];
/* % */
if ($configurations['REFERRAL_DISCOUNT_TYPE'] == 1)
if ($configurations['REFERRAL_DISCOUNT_TYPE'] == Discount::PERCENT)
$discount->value = (float)$configurations['REFERRAL_PERCENTAGE'];
/* Fixed amount */
elseif ($configurations['REFERRAL_DISCOUNT_TYPE'] == 2 AND isset($configurations['REFERRAL_DISCOUNT_VALUE_'.(int)($id_currency)]))
elseif ($configurations['REFERRAL_DISCOUNT_TYPE'] == Discount::AMOUNT AND isset($configurations['REFERRAL_DISCOUNT_VALUE_'.(int)($id_currency)]))
$discount->value = (float)$configurations['REFERRAL_DISCOUNT_VALUE_'.(int)($id_currency)];
/* Unknown or value undefined for this currency (configure your module correctly) */
else