Family Plan (Restrict by address)

3 months 2 weeks ago #322099 by AlexRag
Family Plan (Restrict by address) was created by AlexRag
I've been testing out the Family Plan feature and it's been great so far.

My questions come from this use case scenario. I have a site that sells household memberships for a neighbourhood association. The yearly renewable fee is sold on a per household basis (usually with 2 per plan).

Sign up is also restricted to certain addresses to do this I have set up 3 field items:
1. Street number
2. Street name (this is a drop down so only certain streets are available to choose from
3. Postal code (also a dropdown with limited options)

Ideally the address in one field item would be better but I have not figured out a way to input 380 addresses for users to select from.

So here is the question:
Is it somehow possible to restrict the registration of the second user that the primary shared the plan with be from the same address of the primary user? The thinking here is to only allow the primary to be able to share the plan with someone else as long as they are in the same household. This would avoid 2 people from 2 addresses sharing the plan.

This would essentially means the address the 2nd user inputs when registering has to checked that it matches the primary before allowing the sign up.

I know there's tonnes of automation options available with CB so if there's any membership extension out there that can do this, it would be CB

Please Log in to join the conversation.

3 months 1 week ago - 3 months 1 week ago #322123 by krileon
Replied by krileon on topic Family Plan (Restrict by address)

Is it somehow possible to restrict the registration of the second user that the primary shared the plan with be from the same address of the primary user? The thinking here is to only allow the primary to be able to share the plan with someone else as long as they are in the same household. This would avoid 2 people from 2 addresses sharing the plan.

No, there are no conditions applied to the shared subscription and no triggers available to apply any such conditions. It would make it a frustrating and complicated process to share with an email address and then it fail due to conditions especially if the user goes through registration to accept the subscription and can't due to conditions. There's no plans to support such a feature at this time. Will review adding triggers to CBSubs Family Plans though so you can code in your own conditions for accepting a shared subscription.

forge.joomlapolis.com/issues/8315


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.

3 months 1 day ago #322390 by AlexRag
Replied by AlexRag on topic Family Plan (Restrict by address)
I figured it would be a little complex. Looking forwards to seeing what you had in mind for adding some triggers.

Please Log in to join the conversation.

2 months 4 weeks ago #322401 by krileon
Replied by krileon on topic Family Plan (Restrict by address)
The following triggers should be available in latest CBSubs. Note they won't be in CB Auto Actions dropdown so just type them manually.

$_PLUGINS->trigger( 'familyplans_onCanAcceptSharedSub', array( &$this, $userId, $subscription ) )
$_PLUGINS->trigger( 'familyplans_onBeforeAcceptSharedSub', array( &$this, $user, $subscription ) )
$_PLUGINS->trigger( 'familyplans_onAfterAcceptSharedSub', array( $this, $user, $subscription ) )
$_PLUGINS->trigger( 'familyplans_onAfterDeleteSharedSub', array( $this, $user, $subscription ) )

You should ideally be doing your additional validation on familyplans_onBeforeAcceptSharedSub since you need to validate against user data and it contains the full user object. Simply use a Code action and using the Output of the auto action return false to fail the validation and prevent accepting the subscription.


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.

2 months 4 weeks ago - 2 months 4 weeks ago #322439 by AlexRag
Replied by AlexRag on topic Family Plan (Restrict by address)
Thanks Kyle.

This may be beyond my scope of knowledge but will see what I can figure out. Up to now, I've also used probably a fraction of the power of the Auto Actions plugin. Nothing too complex, even though it can handle it.

--- Update ---

I have been doing more testing out of the user experience with a user sharing a plan with another user.

I discovered something interesting. Even though the primary user sent the email to a specific email address, the shared user can actually register an account with another email address.

I'm not sure this is entirely a bad thing, other than wanting to make sure the shared recipient is meant to have access gets the email, but I suppose this is allowable for the same reason as above.

Please Log in to join the conversation.

2 months 4 weeks ago #322461 by krileon
Replied by krileon on topic Family Plan (Restrict by address)

I discovered something interesting. Even though the primary user sent the email to a specific email address, the shared user can actually register an account with another email address.

Correct, that's working as intended.


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.

Moderators: beatnantkrileon
Time to create page: 0.430 seconds

Facebook Twitter LinkedIn