Skip to Content Skip to Menu

🏖 Summer has arrived! Start your summer right with our summer sale! Get 25% off professional and developer memberships with code SUMMER-2025!

Upgrade Configuration and how to correctly adjust amount due

  • AlexRag
  • AlexRag
  • OFFLINE
  • Posts: 512
  • Thanks: 34
  • Karma: 6
5 days 16 hours ago - 5 days 16 hours ago #341494 by AlexRag
I just discovered something interesting with more testing.  It appears as though the only way to trigger prorating from one plan to another, both the FROM and TO plan need to have the "Prorate remaining value of this plan when upgrading" enabled, which explains why I was seeing it when I tested the Adult >> Family upgrade.

 

So, my next question is there a way to adjust how the prorating is calculated?

I am curious if there is an option to not take into account the remaining value, but on the full value. So instead of calculating how many days are left of the old plan, it just considers the whole value.  That is charging $80 ($100-$20).

In the newer test, of upgrading from the Adult Plan >> Special Plan, it calculated the fee of $80.76, so .76 was charged for the 14 days (July 1 - 14) the old plan was in effect before the upgrade. ($20/365x14).   In essence, it's not prorating since the full old plan value is being calculated.   

Thanks,
Alex



 
Last edit: 5 days 16 hours ago by AlexRag.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49341
  • Thanks: 8439
  • Karma: 1465
5 days 3 minutes ago #341496 by krileon
The prorating only takes into account the remaining value.

For a more customized control over this you could actually just turn prorating off then instead use a promotion applied via CBSubs Promotions. It has conditions where you'll be able to make sure they're upgrading from one plan to another and for it to only apply to the adult plan for example. There you could offer whatever discount you like (e.g. the same price as your other plan).


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.

  • AlexRag
  • AlexRag
  • OFFLINE
  • Posts: 512
  • Thanks: 34
  • Karma: 6
4 days 14 hours ago - 4 days 14 hours ago #341503 by AlexRag
Thank you!  Yes, I will have a closer look at the Promotion plugin.  That may be better for this use case.    I forgot there are conditional options with Promotions!

As it turns out, I only have less than 6 members who would be using this upgrade path, so I was thinking of just creating 6 coupon codes that they can each use to apply to the upgrade.   I just need to make sure that when the upgraded plan expires, it behaves like the standard plans.  Or allow them to keep both plans, and when the special one expires, everything reverts to normal.

Would it make sense to keep the Adult plan as exclusive, but make the special plan a child so they could be members of both plans?



And for future reference, if I were to ever use the prorating option.   Is it normal that both plans need to have prorating on to work, as I found with testing, instead of just the FROM plan having the prorating enabled?
 
Last edit: 4 days 14 hours ago by AlexRag.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49341
  • Thanks: 8439
  • Karma: 1465
3 days 23 hours ago #341504 by krileon

Would it make sense to keep the Adult plan as exclusive, but make the special plan a child so they could be members of both plans?

Both plans need to be marked exclusive for an actual upgrade from one plan to another to take place. If you want them to have both plans for whatever reason then both need to be marked non-exclusive, but they would not be upgrading from one plan to another in that case.

And for future reference, if I were to ever use the prorating option. Is it normal that both plans need to have prorating on to work, as I found with testing, instead of just the FROM plan having the prorating enabled?

Yes, it's normal for both plans to require prorating for it to apply. The tooltip description is a bit wrong.


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

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

  • AlexRag
  • AlexRag
  • OFFLINE
  • Posts: 512
  • Thanks: 34
  • Karma: 6
2 days 9 hours ago #341511 by AlexRag
Once a user is upgraded to the special plan, I’d like to redirect them to a welcome page and/or send them an email.   I think auto actions is the answer to accomplish this. 

I was wondering what trigger I should use to make this happen. 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49341
  • Thanks: 8439
  • Karma: 1465
1 day 23 hours ago - 1 day 23 hours ago #341512 by krileon
The below should do the trick using CB Auto Actions.

Global
Triggers: onCPayDisplayBasketResult
Type: Redirect
User: Self
Access: Everybody
Conditions
Field: Custom > Value
Custom Value: [var1_payment_status]
Operator: Equal To
Value: Completed
Action
URL: index.php
Message: [var2]

This should redirect to your homepage after a completed basket payment and display the thank you message or any messages the payment process would normally display as a Joomla message.

This currently will redirect on any payment. To redirect only for a specific plan you'll need to add the following condition.

Type: Code
Code:
Code:
$plans = []; foreach ( $variables['var1']->getSubscriptions() as $sub ) {     $plans[] = $sub->get( 'plan_id', 0 ); } return $plans;

Operator: Does Contain
Value: YOUR_PLAN_ID_HERE


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: 1 day 23 hours ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum