SuperDuper Posted December 4, 2010 Share Posted December 4, 2010 Hello,Can I set 2:1 ratio to the "Referral Program"?For example, existing client earns 10USD when new client placed the order.Meanwhile, the new client also can earn 5USD for this order. not both earn 10USD.Could anyone please teach me how to achieve it?Many Thanks! Link to comment Share on other sites More sharing options...
SuperDuper Posted December 4, 2010 Author Share Posted December 4, 2010 Any ideas?? :smirk: Link to comment Share on other sites More sharing options...
SuperDuper Posted December 5, 2010 Author Share Posted December 5, 2010 Please help.Can the value of "friend earns" is "sponsor earns" divided by 2??? Link to comment Share on other sites More sharing options...
rocky Posted December 6, 2010 Share Posted December 6, 2010 Try changing line 83 of modules/referralprogram/ReferralProgramModule.php from: $discount->value = floatval($configurations['REFERRAL_DISCOUNT_VALUE_'.(int)($id_currency)]); to: $discount->value = floatval($configurations['REFERRAL_DISCOUNT_VALUE_'.(int)($id_currency)]); if ($register == 'sponsored') $discount->value = $discount->value / 2; Link to comment Share on other sites More sharing options...
SuperDuper Posted December 6, 2010 Author Share Posted December 6, 2010 Hi rocky,It works!! Thanks!!And how can I also /2 in the Referral-Program-Page?? (See Attachment)I can not do that........Thank you. Link to comment Share on other sites More sharing options...
rocky Posted December 6, 2010 Share Posted December 6, 2010 Try changing line 22 of modules/referralprogram/referralprogram-program.php from: $discount = Discount::display(floatval(Configuration::get('REFERRAL_DISCOUNT_VALUE_'.intval($cookie->id_currency))), intval(Configuration::get('REFERRAL_DISCOUNT_TYPE')), new Currency($cookie->id_currency)); to: $discount = Discount::display(floatval(Configuration::get('REFERRAL_DISCOUNT_VALUE_'.intval($cookie->id_currency))), intval(Configuration::get('REFERRAL_DISCOUNT_TYPE')), new Currency($cookie->id_currency)); $half_discount = Discount::display(floatval(Configuration::get('REFERRAL_DISCOUNT_VALUE_'.intval($cookie->id_currency))) / 2, intval(Configuration::get('REFERRAL_DISCOUNT_TYPE')), new Currency($cookie->id_currency)); and line 144 from: 'discount' => $discount, to: 'discount' => $discount, 'half_discount' => $half_discount, and changing line 73 of modules/referralprogram/referralprogram-program.tpl from: {l s='he or she will receive a' mod='referralprogram'} {$discount} {l s='voucher and you will receive your own voucher worth' mod='referralprogram'} {$discount}. to: {l s='he or she will receive a' mod='referralprogram'} {$half_discount} {l s='voucher and you will receive your own voucher worth' mod='referralprogram'} {$discount}. Link to comment Share on other sites More sharing options...
SuperDuper Posted December 6, 2010 Author Share Posted December 6, 2010 WoW!! Great!! It works!!I can not achieve it without your help.Really thanks again. :cheese: [sOLVED] Link to comment Share on other sites More sharing options...
rocky Posted December 6, 2010 Share Posted December 6, 2010 Thanks. By the way, there is more code that needs to be edited if you want the emails that are sent to to also have the half discount. The code is very similiar to the code above. Link to comment Share on other sites More sharing options...
SuperDuper Posted December 6, 2010 Author Share Posted December 6, 2010 I see. Thanks for your remind.I just typed the exact amount of the discount to the email html file.Therefore, there are no any mistakes in the email.Thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts