Skip to Content Skip to Menu

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

Buy promotional codes using CB subs plan for another plan - CB Subs

11 years 2 months ago #231966 by LearnThingsAfrica
Simply put we want to be able to sell promo codes on the fly so lets say buying a plan will email you a promo code that another user can get as a discount on a different plan from the one you bought. How could you do this? We have both CB Subs and professional membership

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #231988 by krileon
You'll probably need to create promotion codes unique to the user on the fly. Example of this as follows using CBSubs SQL Actions.

www.joomlapolis.com/forum/255-developer-members-support/222032-solved-family-subscription#231056


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.

11 years 2 months ago #232500 by LearnThingsAfrica
Hi Kyle

Thanks very much for the guidance. I have looked at that post unfortunately I don't have developer membership so I cannot update there but I am sure what I am about to ask would have helped others searching the forums.

1. How do I make the child subscriptions expire on the same day as the parent subscription.
2. Renew and expire when the parent subscription is renewed or expires but the child subscribers cannot renew their own subscriptions.

Basically I need the child subscribers to mirror the subscription of the parent subscriber but not be able to control it. If it helps I have also got groupjive and the parent subscriber is the owner of a group that contains all the child subscribers.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #232523 by krileon

1. How do I make the child subscriptions expire on the same day as the parent subscription.

You don't unless you use CBSubs SQL Actions to force them to expire via database query, but I won't help with this usage as it's invalid and will fire no CBSubs triggers causing none of the integrations to work for whatever you expire via database. Best I can suggest is ensure both parent and child have the same durations so they'll expire roughly at the same time. We've plans to improve this in a future release so parent and child can be grouped together duration wise.

2. Renew and expire when the parent subscription is renewed or expires but the child subscribers cannot renew their own subscriptions

You can only renew 1 plan at a time. We've plans to improve this in a future release so multiple plans can be purchased and renewed at same time. You can't subscribe to or renew a child plan as is if the parent is expired.


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.

11 years 2 months ago #232593 by LearnThingsAfrica
Maybe I confused things by using the terminology parent and child subscriptions which is used in cb subs, I was not referring to this at all. What I mean is that everyone is on the same plan but the original subscriber is a groupjive group owner every time someone joins the group they also subscribe to the plan automatically without payment until the group owner is no longer subscribed to that plan so;

1. When the group owner's plan expires all the group members plans expire.
2. When the group owner renews his plan all the group members have the plan again as well.
3. Group members cannot renew their own plans only the owner.

I have looked at auto actions and groupjive cb subs integration but I can't seem to find a solution for this scenario. It also seems like there are no triggers for plan expiration or subscription for cb subs in cb auto actions, am I wrong?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #232631 by krileon

I have looked at auto actions and groupjive cb subs integration but I can't seem to find a solution for this scenario.

Best I can suggest is try using the new Internal Users trigger in CB Auto Action then using the Internal Users URL found in CB Auto Action > Config > Internal to execute the actions with the Internal Users trigger. This will cause the action to execute on every user. You'd then need to add a conditional to check if their group owner is still active and if they're not then expire their subscription. To check if their group owner is still active you could probably use CB Query Field to query the database table _cbsubs_subscriptions to see if they expired or not.

In short there is no simple solution. Best case scenario is develop a custom plugin to do exactly what you're wanting.

It also seems like there are no triggers for plan expiration or subscription for cb subs in cb auto actions, am I wrong?

There are, you'd use the trigger onCPayUserStateChange with a conditional of [var2] to check the status. For example [var2] Equal To A means the plan is active and to continue with the action.


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: LearnThingsAfrica

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

Moderators: beatnantkrileon
Powered by Kunena Forum