CBSubs Family Subscriptions

9 years 4 months ago #254755 by dg1982
Replied by dg1982 on topic CBSubs Family Subscriptions
Got it. How do I handle this part if I'm running RC 4?

Auto Action 4: Update family profile cb_fmemstatus1 to ALLOCATED when new family member is created with following characteristics:
Type: CB Paid Subscriptions 3.X
Triggers: onAfterUserUpdate
User: Automatic
Access: Everybody
Conditions:

[cb_afmstatus1] Equal To SUBSCRIBE
[cb_afmparent1] Not Empty

Query:
UPDATE #__comprofiler SET cb_fmemstatus1 = 'ALLOCATED' WHERE (user_id = [cb_afmparent1] AND cb_fmemstatus1 = 'OPEN');
UPDATE #__comprofiler SET cb_fmemhistory1 = CONCAT(NOW(),' : ALLOCATED to userid = [user_id] / username = [username]
', cb_fmemhistory1) WHERE user_id = [cb_afmparent1];

Please Log in to join the conversation.

9 years 4 months ago #254759 by dg1982
Replied by dg1982 on topic CBSubs Family Subscriptions
The above looks like a typo in the tutorial. Should it be a query and the next one down be Pad Subscription type?

Also, I am trying to figure out how to condition the Accept Family Plan tab. In the tab's integration config I cannot select which plans enable the tab. Not sure if I'm supposed to even need to do this but I can't see anywhere else in the tutorial where this is done.

B. Visibility depending on Viewer's subscriptions
1) For other viewers:
Viewer Plans controlling tab visibility by viewer (none means not controlled)
Parameter Handler for type=cbsubs_plans is not implemented or not loaded.

Thanks for all the help!

Please Log in to join the conversation.

9 years 4 months ago #254766 by krileon
Replied by krileon on topic CBSubs Family Subscriptions

The above looks like a typo in the tutorial. Should it be a query and the next one down be Pad Subscription type?

Yeah, that looks like a typo. Action 4 should be Query type and Action 5 should be CB Paid Subscriptions type.

Also, I am trying to figure out how to condition the Accept Family Plan tab. In the tab's integration config I cannot select which plans enable the tab. Not sure if I'm supposed to even need to do this but I can't see anywhere else in the tutorial where this is done.

B. Visibility depending on Viewer's subscriptions
1) For other viewers:
Viewer Plans controlling tab visibility by viewer (none means not controlled)
Parameter Handler for type=cbsubs_plans is not implemented or not loaded.

I believe this is fixed as long as you're using CB 2.0.4 and CBSubs 4.x nightly release.


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.

9 years 4 months ago #254777 by nant
Replied by nant on topic CBSubs Family Subscriptions

dg1982 wrote: The above looks like a typo in the tutorial. Should it be a query and the next one down be Pad Subscription type?


Yup - typo - fixed - Thanks for reporting ;-)

Please Log in to join the conversation.

9 years 4 months ago #254855 by dg1982
Replied by dg1982 on topic CBSubs Family Subscriptions
Another apparent typo... these should be reversed (accept is conditioned off fmemshowtab)?

Accept Family Plan tab
This tab is allocated to the Family Plan subscriber using the CBSubs TabsFields Protection integration plugin and contains CB fields that will conditionally appear when needed to assist the subscriber to assign the Family Member plan.
Family Member tab
Once a Family Plan subscriber allocates a Family Member plan to a user this Family Member tab will appear (it is conditioned off the cb_fmemshowtab field that is set to 1 by the Register family member 1 auto action or the Assign family member 1 auto action

Please Log in to join the conversation.

9 years 4 months ago #254856 by dg1982
Replied by dg1982 on topic CBSubs Family Subscriptions
Also to what are the plan ID's referring to here please?

UPDATE #__comprofiler SET cb_fplanexpdate = (SELECT expiry_date FROM #__cbsubs_subscriptions WHERE (status='A' AND user_id = '[user_id]' AND plan_id = '1'));
UPDATE #__comprofiler SET cb_fmemhistory1 = CONCAT(NOW(),' : OPEN') WHERE (user_id = '[user_id]');

SQL Action 1: Renewal:
(set expiration date of non expired Family Member plan to be same as new expiration date of Family Plan)
UPDATE #__cbsubs_subscriptions SET expiry_date = '[cb_fplanexpdate]' WHERE (status='A' AND plan_id='2' and user_id = '[cb_assignid1]');

SQL Action 1: Deactivation:
(Set expiration date of Family Member plan to be one day after today)
(Set cb_fmemstatus1 field to 'DEACTIVATED')
UPDATE #__cbsubs_subscriptions SET expiry_date = date_add(now(), interval 1 day) WHERE (status='A' AND plan_id='2' and user_id = '[cb_assignid1]');
UPDATE #__comprofiler SET cb_fmemstatus1 = 'DEACTIVATED' WHERE user_id = '[user_id]';

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.253 seconds

Facebook Twitter LinkedIn