upgrade registration logic and referral program plugin for [url removed, login to view]
site built on webasyst php framework : [url removed, login to view]
if user came to site without referral link then he must be registered under sites own referral
if user came to site by other users referral link then he must be registered under user whom that referral link belongs
each user has one referer and can have infinite amount of referrals
each user gives 25% of his own total income to his referer
each user recieves 25% from total income of his own referral
each user has three types of income:
a)income from his own shopping as a cashback/bonus from site
b)income from his referrals
c)total income wich formed from his shopping/cashback + income from own referrals
user1 came to site without referral link. site registered him under itself. then user1 made shopping for 2000 and recieved 200 as a cashback/bonus from site. because site gives 10% from sum of each shopping back to every user. so user1 shares 25% of his total income with the site. 25% of 200 is 50. so user1 gives 50 to the site.
user2 came to site by referral link of user1. site registered him under user1. so user2 gives 25% of his total income to user1. and user1 gives from his own total income to site.
every user must have detailed information about all incomes and remining balance at his account page
for more info see the graphic explanation