Your cart is currently empty!
Multi-tiered commission with Affiliate Product (Follow-Up)
—
by
Hi guys,
This is a follow-up to the following thread : https://www.itthinx.com/topic/multi-tiered-commission-with-affiliate-product/
Is it possible that when tiers are processed through Affiliate Product the option “Level rates are relative” causes some issues?
I just tested buying a product with the following affiliate structure…
Direct commission : 10%
Product commission : 15%
Tier 1 commission : 20% (relative)
Tier 2 commission : 30% (relative)
Affiliate 1
–Affiliate 2
—-Affiliate 3
——Affiliate A (is linked to product)
——–Affiliate B
———-Affiliate C
————Affiliate D
Total purchase : 1320.00$
Affiliate D buys product and refer himself -> 10% commission = 132.00$ (OK)
Affiliate C earns the Tier 1 commission (trigger:Enterprise) -> 20% relative = 26.40$ (OK)
Affiliate B earns the Tier 2 commission (trigger:Enterprise)-> 30% relative = 7.92$ (NOT OK, Commission calculated was 39.60$)
Affiliate A earns the product commission -> 15% = 198$ (OK)
Affiliate 3 earns the Tier 1 commission (trigger:Products) -> 20% relative = 39.60$ (OK)
Affiliate 3 earns the Tier 2 commission (trigger:Products) -> 30% relative = 11.88$ (NOT OK, Commission calculated was 59.40$)
———————-
Here are some more tests
Example :
Affiliate A invites Affiliate B who registers and become an affiliate
Affiliate B was permanently assigned to Affiliate A using Affiliates Permanent
Affiliate B has submitted a product X which is assigned to him using Affiliates Products
User C was invited and permanently assigned to Affiliate B
User C purchases Affiliate B’s product
Total 1200
COMMISSIONS
Affiliate B
-15% commission for the sale of a product assigned to him
-10% commission from permanent assignment to User C (permanent)
=180+120=300
Affiliate A
-20% commission from the 15% product commission (product tier)
-20% commission from the 10% commission (tier)
=36+24 (ok)=60
———————
Affiliate A invites Affiliate B who registers and become an affiliate
Affiliate B was permanently assigned to Affiliate A using Affiliates Permanent
Affiliate B has submitted a product X which is assigned to him using Affiliates Products
Affiliate C was invited and permanently assigned to Affiliate B
Affiliate C buys product X and refers himself
Total 1200$
COMMISSIONS
Affiliate C (referring himself)
-10% commission for the autoreferral
=120
Affiliate B (Affiliate C is assigned and in Affiliate B’s team)
-15% commission for the sale of a product assigned to him
-20% commission from the 10% commission for Affiliate A (tier)
=180+24=204
Affiliate A
-20% commission from the 15% product commission (product tier)
-30% commission from the 10% commission relative to Affiliate B (tier)
=36+36 (should be 7.20)
Waiting for your feedback. I’ll do more tests tomorrow.
Kind regards,
B
——-
Update : Is it possible that the modification I made to the affiliates_user_is_affiliate_id() function in Affiliate Permanent does not take into account tiers? I feel like that might be related to the fact I’m returning on three different situation “self::get_referrer( $user_id );” and my intuition tells me there’s probably a place here where I should have a different logic…
Still working on this.
——-
Update 2 : I have made several tests and I don’t think it’s possible to fix the problem only within the affiliates_service_affiliate_id() function. My guess is that this routine is only called once and won’t really influence the tiers calculation. Once again I’m a bit stuck as I’m not sure where I should be looking at. I’m trying to decipher the tiers calculation but since I’m not really sure I would need to modify the calculation I’m a bit hesitant to change stuff in here.
I have to understand why the calculation is made based on the original referrer amount and not the tier amount.
Will continue to work on this after I get some sleep.
Cheers,
Bastien
Comments
One response to “Multi-tiered commission with Affiliate Product (Follow-Up)”
Hi Bastien,
Tiers are based on the original referrer amount. So in your case, you can calculate the rates:
Tier 1: 20% relative
Tier 2: 6% relative (20% x 30%)
Kind Regards,
Antonio B.