Skip to Content Skip to Menu

Extend Expiry date when upgrading to different plan

8 years 3 months ago #284866 by gilbertstudios
Hello,

We have four plans created, giving membership for four levels of time:
-- 1 year
-- 6 mos
-- 3 mos
-- 1 mo

We have just spotted an error, whereby when someone changes plans, it essentially erases the credit they previously had, and replaces it with the new one.

That is to say:
-- if I sign up for the 3 mo plan, it gives me credit through 10/31/16.
-- BUT if I then "upgrade" to the monthly plan (to pay one additional month), it removes the previous expiry and replaces it with the new one == 08/31/16.



...What they WANT to happen is that the expiry date keeps being extended when people switch plans, so that they do not lose any amount of time for which they have already paid.

(I understand WHY this is happening, because the system just switches plans and gives them the new date, but it's not what we want to happen.)


I have reviewed the "upgrade" and "workflow" options, but cannot figure out how to make this happen.

I have the Manual Renewal setting as "Renewal extends expiration date (without gap or overlap)" but this doesn't apply when switching between plans.

How can I set it up to make this happen as we want?


Thank you for your help!!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
8 years 3 months ago #284896 by krileon
CBSubs doesn't work how you're trying to make it work. You can't have say 4 plans and have their durations add up. That's just not how it works. You're replacing 1 plan with another and if you replace a 6 month plan with a 1 month plan then it's time and money lost. By default CBSubs shouldn't let you downgrade to a cheaper plan like that to avoid such scenarios. The only parameter applying for plan to plan is Prorating which is configured under the Pricing tab of your plans.

Best I can suggest is probably to use CBSubs SQL Actions and extend their expiration date based off their previous subscription (you should be able to find that easily since their database row should contain what they upgraded from). This likely however will not work correctly with recurring payments usage.


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.

8 years 3 months ago #284904 by gilbertstudios
Replied by gilbertstudios on topic Extend Expiry date when upgrading to different plan

krileon wrote: Best I can suggest is probably to use CBSubs SQL Actions and extend their expiration date based off their previous subscription (you should be able to find that easily since their database row should contain what they upgraded from). This likely however will not work correctly with recurring payments usage.


Can you please tell me specifically how to do this?

Or... if you can think of any other alternatives, i would very much appreciate it!!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
8 years 3 months ago #284935 by krileon
You need to write a custom database query for that. Specifically on the database table _cbsubs_subscriptions. The subscription they upgraded from should have its ID stored in the replaces_subscription column. The [subscription_id] substitution in your SQL action would be used to grab the subscription they just activated. So with that info you'd grab their active subscription, check if it has replaced anything, if it has you'll then need to do date range comparisons and add remaining duration to the new subscription row.

I'm really not comfortable suggesting anything more specific unless you're very experienced with SQL. Tampering with the subscription row can cause all kinds of problems.


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

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

8 years 3 months ago #284947 by gilbertstudios
Replied by gilbertstudios on topic Extend Expiry date when upgrading to different plan
thank you.

i am not comfortable tampering with any of that.

i will leave it as is, and hope they accept my suggestions to add explanations or restrict the upgrades.


that would be possible, right?

== to not allow upgrade until their current subscription expires, and they choose a new one?

thanks again,

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
8 years 3 months ago #284995 by krileon

== to not allow upgrade until their current subscription expires, and they choose a new one?

Yup, you can add conditions to upgrade under the Workflows tab of your plans. So for example hide Plan B if Plan A is active.


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

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

Moderators: beatnantkrileon
Powered by Kunena Forum