Get the value from a CBSubs subscription option

2 months 2 weeks ago #337217 by wintercorn
I've got a plan with no value but several options - it's for donations with no fixed amount. See attached image.

How can I pull this out for use in both a profile and userlist?

I would have thought this would work but doesn't.[cbsubs:if user="#displayed" plan="14" status="A"] £[cbsubs:plans user="#displayed" plan="14" output="sponsoramount" /] [/cbsubs:if]
Thanks
Attachments:

Please Log in to join the conversation.

2 months 1 week ago #337221 by krileon
It's only possible to get the amount they donated at time of donation. There are special substitutions for this that integrations can utilize. So for example you can push the value to a field using CBSubs Fields integration. The substitutions, with examples, are explained under the Integrations > Options > Display tab at the bottom.

I'm not sure why you need CBSubs Options for this though. Donation plans already have price selection built in. You can push the amount they donated to a field using CBSubs Fields for donation plans with the following.

Integrations > CB Fields
Field: FIELD_HERE
Operator: Add: Field = Field + Value
Value: [TOTAL_PRICE]
Remove value on plan deactivation: No

I recommend using a Decimal Number fieldtype. This should add to the fields value anytime they donate through the donation 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.
The following user(s) said Thank You: wintercorn

Please Log in to join the conversation.

2 months 1 week ago #337231 by wintercorn
Replied by wintercorn on topic Get the value from a CBSubs subscription option
I'm using a normal sub instead of a donation as it allows setting the usergroup and it's easier to have them all the same type in case anyone else needs to edit it and gets confused.

Having said that, setting the field value doesn't work for me.

I've got a decimal type field named 'cb_corp_feepaid'. This is output to the profile as [cb_corp_feepaid].

The field value is set in the plan/integrations/cb fields as follows:

Field: cb_corp_feepaid
Operator: Add: Field = Field + Value
Value: [TOTAL_PRICE]
Remove value on plan deactivation: No

Please Log in to join the conversation.

2 months 1 week ago #337232 by krileon
That usage is working perfectly fine in my tests. The payment substitutions pull directly from the basket so [TOTAL_PRICE] will always return the amount paid as it's the mc_gross value of the basket.

My best guess is you've something else acting on subscription status change causing a user store to override whatever CBSubs Field integration has set. This can happen if for example you've an auto action acting on onCPayUserStateChange and you didn't enable Reload User under the Parameters tab.


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

Please Log in to join the conversation.

2 months 1 week ago #337234 by wintercorn
Replied by wintercorn on topic Get the value from a CBSubs subscription option
There are only a few Auto Actions active and they are all maiings or usergroup changers.

Please Log in to join the conversation.

2 months 1 week ago #337237 by krileon

usergroup changers

That will trigger a user store. If they're acting on onCPayUserStateChange try turning on Reload User under Parameters and see if your issue persists.


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

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.241 seconds

Facebook Twitter LinkedIn