Your cart is currently empty!
How send multiple referral to multiple affiliate on single order
—
by
I had affiliate enterprise and woocormmerce integration.
I create two types of group which is role group and team group:
– In the role group, the affiliate with different role will be assigned with different rate
– In the team group, any of the members in the same team group placed an order, the refer will send to
all of the members in the same team group and the rate will be followed with the role group that
assigned
e.g. TeamGroupA:
-member A (also in role group of Leader with 0.5 rate)
– member B (also in role group of Senior with 0.2 rate)
-member C (also in role group of Junior with 0.1 rate)
Scenario:
member B placed an order in woocommerce. All member in TeamGroupA will all get refer with the the
rate in role group.
How could I do that ??
Comments
3 responses to “How send multiple referral to multiple affiliate on single order”
Hi Hin,
Yes of course but please keep in mind that you need to have advanced knowledge of PHP in order to implement this properly.
In this example page you will find a description of affiliates_referral hook which triggers once a referral is recorded. The affiliate id can be retrieved through the $data array and is $data[‘affiliate_id’]. Also there are other useful examples on how to add a referral programmatically.
Regarding groups and once you retrieved the affiliate id, you can get the group by first finding the user id for that affiliate and then after checking this example page you can get the groups the user belongs to and then get all the users for that group.
Finally after getting the rest of the users inside the group, you can get each one’s affiliate id with this function and add referrals for them.
Hope it helps.
Kind regards,
George
May I know any recommend action , or function to use in the situation. e.g to get the group id from user, get the user id under the same group and get an affiliate id. Which action should I use to do that?
Hi,
Thanks for reaching support for your request.
Assuming that you’re using Groups free plugin from Itthinx to organise your users into groups.
If you like all group members to trigger multiple automatic referrals when one of the group members refers a sale, then you need to use a custom implementation. It will get the referrer’s group, then get all the other members of that group and add a referral for each of these members. A prerequisite for this to work properly is to ensure that all group members are affiliates and that each member doesn’t belong to several groups. If the group members belong to multiple groups then you might end up with an infinite loop of referrals for all your affiliates depending on how the groups are setup.
Kind regards,
George