git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11466 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
jmCollin
2011-12-21 10:45:01 +00:00
parent 50642c518f
commit 53ba841568
2 changed files with 18 additions and 4 deletions
+9 -2
View File
@@ -46,8 +46,15 @@ $file = str_replace('{email}', $customer->email, $file);
$file = str_replace('{firstname_friend}', 'XXXXX', $file);
$file = str_replace('{lastname_friend}', 'xxxxxx', $file);
$file = str_replace('{link}', 'authentication.php?create_account=1', $file);
$file = str_replace('{discount}', ReferralProgram::displayDiscount((float)Configuration::get('REFERRAL_DISCOUNT_VALUE_' . Context::getContext()->currency->id), (int)Configuration::get('REFERRAL_DISCOUNT_TYPE'), Context::getContext()->currency), $file);
$discount_type = (int)(Configuration::get('REFERRAL_DISCOUNT_TYPE'));
if ($discount_type == 1)
{
$file = str_replace('{discount}', Discount::display((float)(Configuration::get('REFERRAL_PERCENTAGE')), $discount_type, new Currency($cookie->id_currency)), $file);
}
else
{
$file = str_replace('{discount}', Discount::display((float)(Configuration::get('REFERRAL_DISCOUNT_VALUE_' . $cookie->id_currency)), $discount_type, new Currency($cookie->id_currency)), $file);
}
echo $file;