URL Options

9 months 2 days ago - 9 months 2 days ago #334604 by wjgadmin
URL Options was created by wjgadmin
Hi,

We were super excited about the new options on CBSubs, but not sure if it will work for us, can you please clarify?

We would like to set 3 pricing options for a single plan, but each would need to send a different value via http post (URL integration).

EX: Plan A, Pricing Option 1: $10/month (includes 1 license) / Pricing Option 2: $15/month (includes 2 licenses) / Pricing Option 3: $20/month (includes 3 license)
- each of these would need to appropriately send the corresponding number of licenses to our licensing server via the URL integration.

Currently cannot find an option for that, is there anyway to make it happen using CBSubs? For example, is there a substitution string that would allow us to input that as the value in the URL post?
To further clarify, we send a variable (let's call it numOfLicense) to our server via CBSubs URL feature. Is there anyway to create a string substitution that we could use instead of a fixed number, here's an EX: we currently send (numOfLicense = 1), but we'd like to send something like this (numOfLicense = [OPTION_SELECTION]), where the substitution would have a value of 1,2,3 etc.... which would have to be set somewhere.

I hope this makes sense :) 

Please Log in to join the conversation.

9 months 2 days ago #334605 by wjgadmin
Replied by wjgadmin on topic URL Options
Thinking more on this.... another option could be the ability to add an IF condition into the http post via CBSubs like the following:

IF (Option1) {numOfLicense = 1} ELSE IF (Option 2) {numOfLicense = 2} and so on...

Figured I'd ask just in case this is already something that the CBSubs URL integration can do?

Please Log in to join the conversation.

9 months 2 days ago #334612 by krileon
Replied by krileon on topic URL Options
Substitutions are generated for selection options, but this is only available to the CBSubs integration plugins. You should see a description for them under the Integrations > Options > Display tab. At the bottom of my below blog post there's also an explanation of how to use them with examples.

www.joomlapolis.com/blog/kyle/18983-cbsubs-options


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 to join the conversation.

9 months 2 days ago #334614 by wjgadmin
Replied by wjgadmin on topic URL Options
So this sounds great and may indeed be able to achieve it. Can you please let me know what you think is best for this scenario?

I need to set a total of 3 prices, all of which will have the same expiration = monthly (EX: 1. $1/month for 1 license, 2. $2/month for 2 licenses, 3. $3/month for 3 licenses).

So in this case, I believe I could create 3 different prices in the Options/Prices tab with the above $ amounts with month as validity duration. Then in the "Name" field, just name each "1", "2", "3". Then use the substitution [PLAN_OPTS_PRICE] in the CBSubs/Integrations/URL we're sending?
- the issue with this would be that I don't know how the plan name being "1", "2" or "3" would look on the front end. If that overrides the plan name, this likely wouldn't be a good option.

The other option would be to use the Options/Options tab to produce the different values. It seems like this would be optimal, but I want to make sure I'm understanding this correctly :)
I could set the title = "Would you like to add additional licenses?", name = "additionalLicenses", value = "1", label = "Additional Licenses", price = corresponding price for each. Then, use the substitution [PLAN_OPTS_OPTION_{additionalLicenses}] in the CBSubs/Integrations/URL we're sending. In this example, the output would = 1

Does this sound like it will work for what we need? If so, the only additional quesiton(s) I have would be the naming convention.... if we create a unique name & value for each option, can we use the same for other plans or must every single one of them be unique regardless if they're in the same plan or otherwise?

Please Log in to join the conversation.

9 months 2 days ago #334615 by wjgadmin
Replied by wjgadmin on topic URL Options
I've tried the options (2nd one in previous post) and it will not work. Each time I try to test, our server rejects it because the value being passed isn't being submitted properly. I've tried looking in the history logs, but not sure which to look for.

To simplify, when using the literal value 1 in the http post, it sends as always no problem, but when using [PLAN_OPTS_OPTION_{numOfLicenses}], it doesn't work even though the value is set to 1. So I need to figure out how to get the value to send as the literal value itself, not sure if it's being formatted?
Also want to make sure this same value will be sent every time on not just activation, but also renewal etc...

Thank you

Please Log in to join the conversation.

9 months 2 days ago #334626 by krileon
Replied by krileon on topic URL Options

So in this case, I believe I could create 3 different prices in the Options/Prices tab with the above $ amounts with month as validity duration. Then in the "Name" field, just name each "1", "2", "3". Then use the substitution [PLAN_OPTS_PRICE] in the CBSubs/Integrations/URL we're sending?

Correct, you could do that if that's how you'd like it setup.

I could set the title = "Would you like to add additional licenses?", name = "additionalLicenses", value = "1", label = "Additional Licenses", price = corresponding price for each. Then, use the substitution [PLAN_OPTS_OPTION_{additionalLicenses}] in the CBSubs/Integrations/URL we're sending. In this example, the output would = 1

Yes, that would also work. However you need to be sure to use variable pricing so you increase the price and not override it. You do this by prefixing the price. So for example +10 would cause the option to increase the price by 10.

Does this sound like it will work for what we need? If so, the only additional quesiton(s) I have would be the naming convention.... if we create a unique name & value for each option, can we use the same for other plans or must every single one of them be unique regardless if they're in the same plan or otherwise?

Both methods will work. So use whichever you feel seams best.

[PLAN_OPTS_OPTION_{numOfLicenses}]

Don't include brackets. Since the name of your option is additionalLicenses (from your earlier example) then the substitution would be [PLAN_OPTS_OPTION_ADDITIONALLICENSES] (recommended) or [PLAN_OPTS_OPTION_additionalLicenses].

Also want to make sure this same value will be sent every time on not just activation, but also renewal etc...

The option selection is stored within the basket so it's kept on renewals, etc..


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 1.027 seconds