I would like to create secondary accounts based upon family member's active subscription. i.e. Mom has an active subscription. Son wants to have an active account, without having to pay for it. I want a SQL query that will look at son's registration information, which would include mom's username as a look-up field in his profile (parent username).
Currently, I have a main acocunt subscription plan. It has a SQL query that sets expiration on a set date, regardless of start date. So, I also want the child account to go inactive on the same day as the parent's subscription expires.
What we have now is a main account with a subscription plan. Also, there is a second (kids) account with a different subscription plan, that requires moderator approval. We have to manually check the "Parent Username" field and compare it to the parent's username, and check to see if the parent is active, and then turn on the account manually. I want to alleviate the need for a moderator to accomplish this. I'm not very good with SQL queries though.
Don't add subscriptions through queries. You need to use API to do this. I suggest using CB Auto Actions and its CB Paid Subscriptions 3.x action to give the child account a subscription. It supports conditionals as well so if you have a field that determines they're eligible or not then you'd just condition off of that field.
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.