Editable Plans prices

4 years 2 months ago - 4 years 2 months ago #316419 by agaudin
Editable Plans prices was created by agaudin
Hello

I use CBuilder as a registration form for an annual conference : people can select choices (lectures, meals, and so on) they would like to register on ; based on their choices, a specific price to pay is calculated (with an autoaction which fulfill a text field) and people pay on their arrival.

Example :
- lunch : 10€ YES or NO
- diner : 50€ YES or NO

Total to pay : [a text field, written by an autoaction]


This year I would like to integrate online paiement ; so I purchased and installed CBSubs. I would like to make the plan price automatically calculated according to other fields values but I cannot see how to get it. It seems plans prices cannot belong to other field or cannot be adjusted differently for each user.

Any idea if there would be a trick to do it ? Or an example to show ?

Thanx by advance

Antoine

Please Log in to join the conversation.

4 years 2 months ago #316420 by krileon
Replied by krileon on topic Editable Plans prices
You can alter the price of a plan dynamically using CBSubs Promotions. To increase the price of a plan you use a negative promotion (e.g. -20 increases the price by 20). Promotions can come from fields as well. If the field is stored as a positive instead of negative value you can force it negative using the below usage.

The promotion is: A fixed amount
Fixed Discount Amount in currency above: -[FIELD_NAME]

Replace FIELD_NAME with the name of your field. This should increase the price of the plan by the amount of that field.


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.

4 years 2 months ago - 4 years 2 months ago #316422 by agaudin
Replied by agaudin on topic Editable Plans prices
Thanks a lot for your quick answer. I can see a light at the end of the tunnel ! :cheer:

But i would appreciate a bit more detailled explanations as I am still not sure exactly : correct me if I'm wrong
- I create a plan with a price = 0 which will be the "Total Amount"
- I create as much negative Promotions as I have paid meals in my form (radios ou checkboxes)
But how can I get that a Promotion changes the "Total Amount" plan ?

Thanks again !

Please Log in to join the conversation.

4 years 2 months ago - 4 years 2 months ago #316426 by krileon
Replied by krileon on topic Editable Plans prices
If the meals are just checkboxes or radio fields just create a negative promotion for each one then condition those promotions based off the field select. So for example if you have a checkbox field for sandwich (e.g. field name of cb_sandwich) and it costs $5 you'd have the below promotion.

Basic
Promotion Type: Applies to all purchases
The promotion is: A fixed amount
Fixed Discount Amount in currency above: -5
To which plans this promotion applies: YOUR_PLAN_HERE
Conditions
First condition: This condition:
Date A, Field A or Value A: Following CB field
CB Field A: cb_sandwich
Date B, Field B or Value B: Constant Value or String (CB substitutions can be used)
Value B: 1
Condition 1 (> for Dates): A = B (Value A is equal to Value B )

In this example the plan selected for YOUR_PLAN_HERE will have its priced increased by 5 if the cb_sandwich checkbox field is selected.

There's honestly about 4-5 different ways you can go about this. It sounds like the easiest approach is to just not have fields at all, but instead either subscription plans or merchandise plans for each of the items you intend to allow them to purchase then configure them to be non-exclusive so they can buy multiple plans at once (e.g. sandwich plan + chips plan). Otherwise you need to go the approach of altering a plans price dynamically using promotions like with the above example.


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.

4 years 2 months ago - 4 years 2 months ago #316446 by agaudin
Replied by agaudin on topic Editable Plans prices [SOLVED]

krileon wrote: There's honestly about 4-5 different ways you can go about this. It sounds like the easiest approach is to just not have fields at all, but instead either subscription plans or merchandise plans for each of the items you intend to allow them to purchase then configure them to be non-exclusive so they can buy multiple plans at once (e.g. sandwich plan + chips plan). Otherwise you need to go the approach of altering a plans price dynamically using promotions like with the above example.


Thanks a lot. I imagined more complicated solutions, and yours ("one merchandise plan for each of the items"). And, of course, it works fine ! Thanx fr your advices which avoid me painfull hours of blind tests.

Best regards

Antoine
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.228 seconds

Facebook Twitter LinkedIn