Skip to Content Skip to Menu

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

[SOLVED] Remove reactivate upgrade button

  • Kingsley
  • Kingsley
  • OFFLINE
  • Posts: 10
  • Thanks: 0
  • Karma: 0
11 years 5 months ago - 11 years 5 months ago #226646 by Kingsley
Hi,
I am using a group of CB fields in workflow to automatically offer a list of upgrade plans in cbsubs.
Trying to have the ticks selected by default, but this has been raised in seperate post.

Other problem is: for first offer, the user is faced with list of upgrade options and can select all of them with "ticks". Then pay for all of them together.

When these all expire (eg Next year) ... each plan has a seperate "reactivate button" which means each needs to be paid seperately. This is very painful if many plans. (upto 15 to be paid each year)

Can you suggest solution? or SQL that I can run on "expire" that will allow the upgrade "tick" to be displayed rather than the button so the user can pay for all plans together.

I could run "delete plan" for all users, but this also appears to remove any historical payment records, so would prefer avoid this solution. If this is the only way, can you suggest sql to do it?

thanks
Last edit: 11 years 5 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226681 by krileon
Replied by krileon on topic Remove reactivate upgrade button
You can't bulk renew. Plans must be renewed individually.


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.

  • Kingsley
  • Kingsley
  • OFFLINE
  • Posts: 10
  • Thanks: 0
  • Karma: 0
11 years 5 months ago #226709 by Kingsley
Replied by Kingsley on topic Remove reactivate upgrade button
Thanks Kyle for prompt reply,

Do you have a list of cbsubs fields and their possible contents, so I can build some sql? or is there a tool to assist in doing this ?

I was thinking of writing sql that runs on expiry and deletes the record, so the user can then select the plan as if they never had one.

Can you provide the sql that runs when the "delete button" is pushed (or ticked)in a user > subscription back end.

Not an elegant approach, more like a sledgehammer. :)

Obviously I would be testing sql in an offline environment.
thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226750 by krileon
Replied by krileon on topic Remove reactivate upgrade button

Do you have a list of cbsubs fields and their possible contents, so I can build some sql? or is there a tool to assist in doing this ?

No, we do not advise tampering with the CBSubs database tables.

I was thinking of writing sql that runs on expiry and deletes the record, so the user can then select the plan as if they never had one.

I suggest using CB Auto Actions as it now has a CB Paid Subscriptions action and it's capable of safely deleting subscriptions if you absolutely want this. You can configure it to delete whatever subscription you like on plan status change trigger for example. Example as follows.

Type: CB Paid Subscriptions 3.x
Triggers: onCPayUserStateChange
Access: Everybody
Conditional 1: [var2] Equal To X
Conditional 2: [var3] Equal To 1
Plans: Your Plans To Delete
Mode: Delete

Change "1" for "Conditional 2" to the Plan ID you're expecting to expire. The first conditional checks that the plan 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.

  • Kingsley
  • Kingsley
  • OFFLINE
  • Posts: 10
  • Thanks: 0
  • Karma: 0
11 years 5 months ago #226801 by Kingsley
Replied by Kingsley on topic Remove reactivate upgrade button
thankyou, I seem to have this working .. still testing various options.

Using your code I would need to have a cb auto action for each plan. This is ok but ... now having played with this (very powerful) plugin,

As most of my plans expire on a certain date for everybody that has those plans.
Can I combine (and delete for everybody) a bunch of plans by:

Different trigger ?
Condition 1: if after date 30th June 2013
Plans: can select multiple plans now using control key.
Mode: Delete

if so, code for condition 1? or different trigger ?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226818 by krileon
Replied by krileon on topic Remove reactivate upgrade button

Using your code I would need to have a cb auto action for each plan.

Yup.

Can I combine (and delete for everybody) a bunch of plans by:

Sure, but I'd set the conditionals as follows.

Conditional 1: [var2] Equal To X

Just exclude the Plan ID check. This way it deletes them all when any plan expires. You could also use the below, which will match against multiple Plan IDs.

Conditional 1: [var2] Equal To X
Conditional 2: [var3] Is REGEX \(^1$)|(^2$)|(^3$)|(^4$)\

The above uses REGEX to match the Plan ID. You'd separate additional IDs with |. The above matches plans 1, 2, 3, and 4 for example. The (^PLAN_ID$) usage is needed to avoid partial ID matching.


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