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

// clean code

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8328 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2011-09-03 17:21:32 +00:00
parent adb185cdf9
commit 3eff951265
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