Skip to Content Skip to Menu

Enforce New Required Field on Membership Renewal

  • petekuhn
  • petekuhn
  • ONLINE
  • Posts: 279
  • Thanks: 39
  • Karma: 0
4 days 21 hours ago #343841 by petekuhn
We are now requiring a field for membership which we didn't before. How can I verify that this field is set when they renew membership? It doesn't seem to check for renewals on the frontend, but it does on the backend.

I'm thinking an Auto Actions of some sort, but I couldn't figure it out.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50396
  • Thanks: 8624
  • Karma: 1472
3 days 7 hours ago - 3 days 7 hours ago #343844 by krileon
We don't have condition logic available for renewals. Just new subscriptions and upgrades. Renewals have very few limitations.

Probably the easiest way is to just intercept the renewal attempt and redirect away with CB Auto Actions. The below should work.

Global
Triggers: onCPayAfterPlanRenewalSelected
Type: Redirect
User: Self
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var1_id]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: SELECT_FIELD_HERE
Operator: Not Empty
Action
URL: [cb:url location="profile_edit" /]
Message: Please complete your profile before renewing.

Replace PLAN_ID_HERE with the plan you want this to apply to. Replace SELECT_FIELD_HERE by selecting the field you want to check for. This will work for both renewal and resubscribe attempts as both go through the same trigger and process. They should be sent to profile edit with the displayed message.


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.
Last edit: 3 days 7 hours ago by krileon.

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

  • petekuhn
  • petekuhn
  • ONLINE
  • Posts: 279
  • Thanks: 39
  • Karma: 0
2 days 31 minutes ago #343852 by petekuhn
I tried that, and it's not triggering. To simplify, I set it to just trigger on the plan ID and not on the new field

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50396
  • Thanks: 8624
  • Karma: 1472
1 day 9 hours ago #343853 by krileon
You need to have the field condition with it otherwise you'll redirect everyone on every renewal. Please be sure the id you supplied is the id in the far right column in CBSubs > Plans not the number under #, which is just a row count. The provided example is a confirmed working example.


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.

  • petekuhn
  • petekuhn
  • ONLINE
  • Posts: 279
  • Thanks: 39
  • Karma: 0
1 day 4 hours ago #343855 by petekuhn
What I'm seeing with the example I sent is not directing anyone, so it looks like it isn't triggering.
At what point in the process is it supposed to trigger? What I'm seeing is that I can select the plan to renew, click Reactivate, and it takes me to PayPal to pay for it.
I was assuming it would trigger before doing that (and that's what I would want it to do, catch the error before the member pays for the renewal).
And yes, the plan ID is correct. I also looked into the subscriptions table to check it for the member I'm testing with.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50396
  • Thanks: 8624
  • Karma: 1472
8 hours 53 minutes ago #343859 by krileon
It should trigger immediately after clicking the button. Is the trigger correctly set to "onCPayAfterPlanRenewalSelected"?

You said clicking the button immediately goes to PayPal and doesn't display the basket at all? They might have an already initialized basket in that case and that existing basket is being paid. The usage I provided intercepts the basket before it's created.

Right click and click inspect element on the reactivate button. You should see the HTML structure there. If you could please tell me what the value of the following input shows.
Code:
<input type="hidden" name="cbpact" value="renew">

Notice mine says "renew". The provided auto action is meant to intercept "renew", "reactivate", and "resubscribe". If it says "pay" then that'd explain why it's not working.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum