Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

how can I do this?

  • camppos
  • camppos
  • OFFLINE
  • Posts: 27
  • Thanks: 1
  • Karma: 0
11 years 6 months ago #225371 by camppos
how can I do this? was created by camppos
I want to build a paying membership that charge $10 a month If members invite other people to joining after recruiting those 10 they would get a free membership for life.

I was told that it can be done with CB invites and CB query field to count the numbers of invites.

What I am trying to figure out is first how the user can generate the invite code.

Second let’s say that the user John generates its invite code abc123 if another user comes and enter the code abc123 then this user is under john and john would get a count of 1 user register after he logs in to the site.

'Welcome john 1 user has register you need 9 more for a free membership'

I would really appreciate any tips regarding these 2 questions

Regards,

Jesus C.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225400 by krileon
Replied by krileon on topic how can I do this?
CB Invites generates invite codes automatically. You don't need to do anything except install it and enable it so users can send invites to join the site. You can then use CB Query Field with the below query to count how many invites they've sent that have been accepted. You'd then create a CBSubs $10 coupon that checks that the field is greater than or equal to 10.
Code:
SELECT COUNT(*) FROM `#__comprofiler_plugin_invites` WHERE `user_id` = '[user_id]' AND `user` IS NOT NULL

An invite code can only be used once then never again. The invite code field fully validates it to ensure an invite code isn't abused. Without the invite code field it will try to accept an invite by email address only. The invite code field allows them to accept the invite while using whatever email address they like.


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 or Create an account to join the conversation.

  • camppos
  • camppos
  • OFFLINE
  • Posts: 27
  • Thanks: 1
  • Karma: 0
11 years 6 months ago #225405 by camppos
Replied by camppos on topic how can I do this?
Krileon,

Thank you for your response, is there any change that the invite code could be the username or a number that can be use many times instead of just once?

The idea is for every user to be able to promote their 'code' on the internet or offline so that they can get the credit without inviting each one of them. ( the code should have to be unique)

and if it is not much trouble how can I make appear the message 'Welcome john 1 user has register you need 9 more for a free membership'

Thank you

Jesus

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225416 by krileon
Replied by krileon on topic how can I do this?

Thank you for your response, is there any change that the invite code could be the username or a number that can be use many times instead of just once?

No, it's a unique code generated internally by CB Invites.

The idea is for every user to be able to promote their 'code' on the internet or offline so that they can get the credit without inviting each one of them. ( the code should have to be unique)

There's no feature for that, sorry.

and if it is not much trouble how can I make appear the message 'Welcome john 1 user has register you need 9 more for a free membership'

After you've created the query field you'd need to use a delimiter field with CB IF substitutions to display various messages. Example as follows.
Code:
Welcome [username] [cb_queryfield] user(s) have registered. You need [cb:if cb_queryfield="0"]10[/cb:if][cb:if cb_queryfield="1"]9[/cb:if][cb:if cb_queryfield="2"]8[/cb:if][cb:if cb_queryfield="3"]7[/cb:if][cb:if cb_queryfield="4"]6[/cb:if][cb:if cb_queryfield="5"]5[/cb:if][cb:if cb_queryfield="6"]4[/cb:if][cb:if cb_queryfield="7"]3[/cb:if][cb:if cb_queryfield="8"]2[/cb:if][cb:if cb_queryfield="9"]1[/cb:if][cb:if cb_queryfield>="10"]0[/cb:if] more for a free membership.


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 or Create an account to join the conversation.

  • camppos
  • camppos
  • OFFLINE
  • Posts: 27
  • Thanks: 1
  • Karma: 0
11 years 6 months ago #226038 by camppos
Replied by camppos on topic how can I do this?
Krileon,

Thank you for all your help. I been able to do all steps you posted but one.

"You'd then create a CBSubs $10 coupon that checks that the field is greater than or equal to 10."

I went to PROMOTIONS create a promotion fill the basic information and click on CONDITIONS. How can I make it to check if it is greater than or equal to the queryfield??


Thank you!
Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #226116 by krileon
Replied by krileon on topic how can I do this?
"Date B, Field B, or Value B:" should be set to "Constant Value or String (CB substitutions can be used)" then set "Value B:" to the amount you'd like them to have greater than (based on the operator you selected) to get the promotion. For example set it to "9" and they'll need 10 or more value from the query field to get the promotion.

Note if I remember correctly you may need to set "Date A, Field A or Value A:" also to "Constant Value or String (CB substitutions can be used)" then set "Value A:" to the substitution "[cb:userfield field="cb_queryfield" /]" (adjust the field substituted as needed).


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum