[SOLVED] Family Subscription

10 years 9 months ago - 10 years 9 months ago #230988 by allenjj
[SOLVED] Family Subscription was created by allenjj
I am setting up my subscriptions plans on a joomla 3.1 site where I have installed Community Builder, CB Subs, Kunena as the forum manager and K2 as the content manager. I have 2 categories of subscriptions where I would like the parent subscription to pay and allow a certain number of child subscriptions to be granted the same rights as the parent. Specially we have a subscription for families (and one for business advertisers) where we would like to offer up to two additional memberships under the one paid subscription. In a previous response to someone else you suggested to use CBSubs Coupons to give them a free subscription. Is it possible to have a coupon created upon a paid family subscription so that it could be limited to only 2 uses for a single family? If so how would I go about that? If not any other suggestions? From your responses to other posts, it looks like CB Auto Actions might work if I created a field for the two additional user ids on the parent subscribers profile (assuming they already exist) and then have CB Auto Actions change their user groups to the paid group. If thats correct, if the parent subscriber updated the names in those fields, or deleted the name in the field, could CB Auto Actions be triggered to execute? The other option I thought about, would be if CB Subs would allow a user to pay for another users subscription? If so I could simply create a promotion rule of buy one get two free in the users shopping basket. I know I can always have the subscription plan email the mods and allow them to manually authorize the subscriptions but would like to have this automated if possible.

John

Please Log in to join the conversation.

10 years 9 months ago #231056 by krileon
Replied by krileon on topic Family Subscription
The best approach is still to use coupons to give to users. You can generate them automatically within CBSubs SQL Actions of your plans using database queries. Example queries as follows.

Activation:
INSERT INTO `#__cbsubs_promotions` (`name`, `promotion_type`, `coupon_code`, `coupon_code_cbfield`, `coupon_description`, `discount_type`, `rate`, `currency`, `amount`, `stages`, `rate_cbfield`, `currency_cbfield`, `amount_cbfield`, `amount_cbfield_deduct`, `priority`, `exclusive_within_priority`, `show_also_zero_values`, `applies_to_first_payment`, `applies_to_recurrings`, `applies_to_registrations`, `applies_to_upgrades`, `applies_to_renewals`, `max_uses_total`, `max_uses_per_customer`, `buyer_geo_zone_id`, `applies_to_business_consumer`, `applies_to_items`, `plans_applied_to`, `plans_sametime_required`, `cal_proratatemporis`, `cal_periodmissed`, `cal_fullmissed`, `cal_maxdperiodsmissed`, `cal_catchuppromotion`, `cond_1_operator`, `cond_1_plans_required`, `cond_1_plans_status`, `cond_1_purchase_ok`, `cond_1_date_1`, `cond_1_date_cbfield_1`, `cond_1_value_1`, `cond_1_dates_diff_a`, `cond_1_dates_diff_b`, `cond_1_date_2`, `cond_1_date_cbfield_2`, `cond_1_value_2`, `cond_2_operator`, `cond_2_plans_required`, `cond_2_plans_status`, `cond_2_purchase_ok`, `cond_2_date_1`, `cond_2_date_cbfield_1`, `cond_2_value_1`, `cond_2_dates_diff_a`, `cond_2_dates_diff_b`, `cond_2_date_2`, `cond_2_date_cbfield_2`, `cond_2_value_2`, `published`, `start_date`, `stop_date`, `viewaccesslevel`, `usergroups`, `user_ids`, `ordering`, `cssclass`, `owner`, `override_plans_display`, `plan_name_descr_display_type`, `plan_name_display_text`, `plan_description_display_text`, `plan_price_display_type`, `plan_price_display_saletext`, `plan_price_display_text`, `params`, `integrations`) VALUES
('Family Discount for [username]', 'coupon', '[user_id]-FAMILY-DISCOUNT', 0, '0', 'percentage', '100', '', '0', '', 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 5, 1, 0, 'A', 0, '', '', 0, '1M', 1, '', 1, '', '', '', 0, '', 0, '', '', '', '', 0, '', '', '', '', 0, '', 0, '', '', '', '', 0, '', 1, '0000-00-00', '0000-00-00', 1, '1', '', 1, '', 0, 0, 0, '', '', 0, 'SALE!', '<p>[NORMAL_PRICE]</p>', '', '');

The above query for example will insert a coupon with the coupon code "USERID-FAMILY-DISCOUNT", which gives 100% off their purchase of anything. It can be used 1 time per user and has a total of 5 uses so it can give 5 users 1 free purchase.

The alternative is maybe a combination of CB Query Field and CB Auto Actions. For example the user could supply an email address to a field for the other users they want to give free subscriptions to when/if they register. You would then create a database query for the CB Query Field to search all _comprofiler rows to see if they've have their email address specified in such a field. If they have then return a 1; if not return a 0 in your SELECT. Now you can use this to condition your CB Auto Action as [cb_queryfield] Equal To 1 and if that's the case give them a subscription using the CB Paid Subscriptions action. You then may want to add another query field to check if they already have a subscription or not, etc..

Both methods are pretty complicated to get going. It's planned to actually add a family subscription feature to CBSubs it self as an integration as it has been requested a lot, but I have no idea when that'll happen.


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.

10 years 9 months ago - 10 years 9 months ago #231100 by allenjj
Replied by allenjj on topic Family Subscription
Very helpful. Is there a way with coupons to limit the coupon to less than 5 uses?

John

Please Log in to join the conversation.

10 years 9 months ago #231110 by krileon
Replied by krileon on topic Family Subscription
Yes, within the query above you'll see the below comma separated list of items. In it is a 5, which you can change to 1 for 1 use, 2 for 2 use, etc..

1, 5, 1, 0, 'A'


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.
The following user(s) said Thank You: allenjj

Please Log in to join the conversation.

10 years 9 months ago #231158 by allenjj
Replied by allenjj on topic Family Subscription
As always the team here is the best with help and support. Am hopeful that you are able to add the Family membership support option to CBSubs but in the mean time I at least have a work around.

John
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.368 seconds

Facebook Twitter LinkedIn