Need help with cbsubs and a dynamic field

12 years 5 months ago #180998 by efficiamail
Need help with cbsubs and a dynamic field was created by efficiamail
Hello this is my website:

exchangemailstat.com

On the registration form, there are four plans, Free trial, Basic, Pro, and Enterprise.

And then there's a dynamic field "No. of Employees"

If the no. of employees entered by the user is 50 or less, the basic membership should be selected.
250 or less = pro
more than 250 = enterprise.

My problem is, I need a validation script wherein if registrant selected Basic subscription, and he entered 200 employees, Pro subscription must be automatically selected.

Another problem, the cost depends on the number of employees entered, for example Pro costs $3.99 per user / month. SO what happens is that --> (No. of Employees) * Cost = Total Amount / Month.

So if 200 employees is entered, that is 200 * $3.99 = total amount to be paid.

I purchased Professional SUbscription since Sir Beat mentioned about CBQuery which will help me on this problem.

I look forward to your replies.

THank you.

Please Log in to join the conversation.

12 years 5 months ago #181032 by beat
I guess this is a similar request to here:
www.joomlapolis.com/forum/87-presales/180309-cb-subs-different-price-to-different-users#180793

So maybe the solution i proposed could also work for you (until we make it simpler setting) ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

12 years 5 months ago - 12 years 5 months ago #181033 by efficiamail
Replied by efficiamail on topic Re: Need help with cbsubs and a dynamic field
hello. from my previous thread, you said i can use the cbquery plugin? which i think is now the cbaction or something like that?

how can i use that to validate the field and multiply it to get the total amount?

please explain it to me like im a 10 years old :)


OFFTOPIC:

Do you have themes for the cbsubs? Is there any way I can edit the way the plans are shown?

here's my site: exchangemailstat.com

Thank you

Please Log in to join the conversation.

12 years 5 months ago #181058 by beat
CB Query field would allow you to do the calculation for the markup from the other cb_employees field using a SQL query, like:
SELECT -(IF(cb_employees<250, cb_employees*3.99, 1000)) FROM jos_comprofiler WHERE id=[user_id];

----

CBSubs is templatable in frontend in almost every aspect, and templates are overridable in joomla template too. There is the rounded template that is delivered in CBSubs package that you can use as a base.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

12 years 5 months ago #181090 by efficiamail
Replied by efficiamail on topic Re: Need help with cbsubs and a dynamic field
on your query, i think you are using constants, isn't there a variable for the amount of each plan, for example, the users < 250, set the plan first to PRO, and then multiply the users by the container of the plan's amount. so that on the database, the plan is PRO as well as the amount is multiplied. Can we do that? thanks

Please Log in to join the conversation.

12 years 5 months ago #181095 by nant
Adding my input below ...

efficiamail wrote: Hello this is my website:

exchangemailstat.com

On the registration form, there are four plans, Free trial, Basic, Pro, and Enterprise.

And then there's a dynamic field "No. of Employees"

If the no. of employees entered by the user is 50 or less, the basic membership should be selected.
250 or less = pro
more than 250 = enterprise.

My problem is, I need a validation script wherein if registrant selected Basic subscription, and he entered 200 employees, Pro subscription must be automatically selected.


With CBSubs 1.2.2 you can conditionally show a CBSubs plan depending on a specific condition of a CB field. So if for example you have a CB radio field that can be set to any one of three values case1;case2;case3 (case 1 can be: less than 50 employees, case2: more than 50 but less than 250, etc), then you can configure plan-A to be presented only if case1 is selected and plan-B only if case2 is selected.

Hopefully you get the idea here.

Another problem, the cost depends on the number of employees entered, for example Pro costs $3.99 per user / month. SO what happens is that --> (No. of Employees) * Cost = Total Amount / Month.

So if 200 employees is entered, that is 200 * $3.99 = total amount to be paid.

I purchased Professional SUbscription since Sir Beat mentioned about CBQuery which will help me on this problem.

I look forward to your replies.

THank you.


I am not sure how and if a CBSubs plan price can be dynamically manipulated this way. So letting Beat and Kyle respond here also.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.225 seconds

Facebook Twitter LinkedIn