Skip to Content Skip to Menu

[SOLVED] Have one main plan with multiple sub/upgrade plans (Auto select other plans)

  • danpoole
  • danpoole
  • OFFLINE
  • Posts: 49
  • Thanks: 6
  • Karma: 0
8 years 2 months ago - 8 years 1 month ago #284740 by danpoole
Hi, please look at the attached graphic to help with the explanation.

I have one main plan (Treatment Guides - Modules 1 & 2) then I have multiple upgrade options (Treatment Guides - Module 4, Module 5, Module 6 etc.)

I want to make it so if a user selects 'Treatment Guides - Module 6' all other upgrades are below it (Treatment Guides - Modules 1, 2, 3, 4 & 5) are included as required). Currently if I select Module 6, it only ads the Main Plan & level 6 (PlansUpgrade2.jpg).
Attachments:
Last edit: 8 years 1 month ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
8 years 2 months ago - 8 years 2 months ago #284762 by krileon
You could increase the price of module 6 to include the price of 1-5 then ensure module 1-5 plans hide if plan 6 is selected. Alternatively you could have a condition on module 6 to only display if plans 1-5 are selected/active. Both usages are configured on the Workflows tab of your plans.


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.
Last edit: 8 years 2 months ago by krileon.

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

  • danpoole
  • danpoole
  • OFFLINE
  • Posts: 49
  • Thanks: 6
  • Karma: 0
8 years 1 month ago #285835 by danpoole
I fixed this problem by getting a coder to make this for me. Now whenever a child plan is selected it won't just select the single child plan and the parent plan but will select all plans in the middle as well.

If anyone has the same problem they are welcome to use the code.
Code:
$('.cbregTick >input').change(function(){ var parent = $(this).parent().parent().parent().parent().parent().parent(); var matchs = $(this).parent().parent().parent().parent(); var itmeid = $(this).attr('id'); if ($(this).is(':checked')){ parent.find('>.cbregTick >input').prop( "checked", true ); if (matchs.hasClass('cbregSubPlanSelector')){ var checked = true; matchs.find('>div').each(function(){ var input = $(this).find('>div>div>input'); input.prop( "checked", checked ); if (input.attr('id') == itmeid) checked = false; }); } } else { parent.find('>.cbregTick >input').prop( "checked", false ); if (matchs.hasClass('cbregSubPlanSelector')) { matchs.find('>div').each(function () { var input = $(this).find('>div>div>input'); input.prop("checked", false); }); } } });
Attachments:
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum