Member kickback system?

6 years 5 months ago #298253 by krileon
Replied by krileon on topic Member kickback system?

Do I literally need to input the text '[var1_user_id]' (without the quotes) here?

Yes.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

6 years 5 months ago - 6 years 5 months ago #298254 by rkreijveld
Replied by rkreijveld on topic Member kickback system?
At what moment is the event invites_onAfterAcceptInvite triggered?
Is that as soon as the link is clicked, or is that after the new user has registered and the new account is enabled?

Please Log in to join the conversation.

6 years 5 months ago #298255 by krileon
Replied by krileon on topic Member kickback system?
That's only fired when the invite is actually accepted. That would be done after registration (does not have to be approved/confirmed).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

6 years 5 months ago - 6 years 5 months ago #298256 by rkreijveld
Replied by rkreijveld on topic Member kickback system?
Ah ... then this solution might not be the best option. We would like to send the kickback after the new user has created and paid for the new account. So maybe I could create an additional action that runs PHP code after the new user created and paid for the new account. Based on the new users's e-mail address I could check the #__plugin_invites table to see of the invitation has been accepted for that email address.
What would be the best event to check for after the new user created and paid for the new account?
onAfterUserConfirm or onAfterUserConformation?

Please Log in to join the conversation.

6 years 5 months ago #298263 by krileon
Replied by krileon on topic Member kickback system?
What you're asking for is exactly what an affiliate tracking system is. I suggest looking into iDevAffiliate or Post Affiliate Pro as both integrate with CBSubs. Otherwise you're basically going to have to rig together your own affiliate system using various plugins, which may not be entirely reliable. There is a trigger fired based off plan subscription status as shown below.

Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A

Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Not Equal To A

However, it has no idea they were invited to join the site and if you conditioned off the invite_code field you'd still have no idea who invited them, which would be necessary to increment the field of the user who invited them. You could probably grab that information using a CB Query Field based off the value of the invite_code field and then you'd substitute in the query field. So I guess something like the below.

Query Field:
SELECT `user_id` FROM `#__comprofiler_plugin_invites` WHERE `code` = '[invite_code]'

That'd give you the user id of the person that invited them if you're using the invite code field on registration. You'd then use the below auto action to increment when their subscription became active.

Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A
Action
Field: YOUR_INTEGER_FIELD_HERE
Operator: Add
Value: 5
Translate Value: No
User: [YOUR_CODE_FIELD_HERE]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.189 seconds

Facebook Twitter LinkedIn