SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to add commission when a new referral switch to premium user

    I have a site which have normal and paid user. Paid user can earn money by clicking on ads and by referring people.
    Both normal and paid user can invite their friends with email.

    My table structure is: usrid, name. email, pass, ref_id, premium(booleon)

    where ref_id is the usrid of the person through which this user created account.
    If B creates through A, and C through B and so on. I want to pay some commission money to A up to level 7 users.
    I didn't create any column for money because i am in doubt how to add money is A when he get referrals or subreferrals(referrals of referral)


    How to do that. I can provide more information if require for answer this problem.

  2. #2
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if B creates through A, you populate B ref_id with A id., if C creates through B you populate C ref_id with B id. To pay A up to the seven referral, You select 7 B referral in ascending order and pay A commission on that. Just like that and the process continues for other members

  3. #3
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by prince55l View Post
    if B creates through A, you populate B ref_id with A id., if C creates through B you populate C ref_id with B id. To pay A up to the seven referral, You select 7 B referral in ascending order and pay A commission on that. Just like that and the process continues for other members
    thanks for your reply. I asked i want to pay whenever user signup through the referral link and switch to premium account.

    And i am paying A for level 7 referrals that means:

    1.All direct referrals of A
    2. All referrals of B
    3. All referrals of C
    4. All referrals of D
    And this will go to F.

    Then it will called 7 levels.

    Which type of code should i use and table structure.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •