Skip to Content Skip to Menu

[SOLVED] Making merchandise plans have parents that are children

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 years 2 months ago #232992 by krileon
Ok, was able to fix that too. Please apply the below quickfix.

IN: /components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/models/product/cbpaidProduct.php
ON: Line 680
FROM:
Code:
$reg_conds_plans_disallowing = $this->_cbArStrToJsArr( $this->reg_conds_plans_disallowing );
TO:
Code:
$reg_conds_plans_disallowing = $this->_cbArStrToJsArr( $this->reg_conds_plans_not_required );
ON: Line 853
FROM:
Code:
if ( $this->reg_conds_plans_disallowing && self::_anyArrInArr( $selectedPlanIds, self::_cbexplode( $this->reg_conds_plans_disallowing ) ) ) {
TO:
Code:
if ( $this->reg_conds_plans_not_required && self::_anyArrInArr( $selectedPlanIds, self::_cbexplode( $this->reg_conds_plans_not_required ) ) ) {

After applying the above you should be able to use the not selected plans conditional. If already configured it should just begin working.


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 or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 years 2 months ago #232994 by krileon
If you've any trouble applying the quick fixes please PM FTP login credentials and can apply them for you.


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 or Create an account to join the conversation.

  • don5420
  • don5420
  • OFFLINE
  • Posts: 55
  • Thanks: 3
  • Karma: 0
11 years 2 months ago - 11 years 2 months ago #232996 by don5420
Thanks! That fixed the bug for not showing. However, the code for me was one line number less for both. So 679 and 852 respectively.

Will these fixes be included in future releases so that I don't need to worry about breaking them if I upgrade?

One last question. Any brilliant ideas on how to have a button/plan/merchandise/anything that will reset to show all three plans again if someone clicks on the wrong one?

EDIT: I made the plans not exclusive, so you can uncheck them. If you look at the develop site, you will see it working. However, it lets them (almost) register without choosing a plan. Is there a way to prevent them from going to step 2 unless they pick a plan? Or, if I make them exclusive again, my original question still applies.

Thanks!

PS - Thanks for the offer to fix via FTP, but I used to be a Coder back in the day. I can handle most of what you send me.
Last edit: 11 years 2 months ago by don5420. Reason: Update...

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 years 2 months ago #232997 by krileon

Will these fixes be included in future releases so that I don't need to worry about breaking them if I upgrade?

All the fixes provided here will be in next release. So you won't need to apply them after upgrading to next release.

One last question. Any brilliant ideas on how to have a button/plan/merchandise/anything that will reset to show all three plans again if someone clicks on the wrong one?

Set your parent plans as non-exclusive. As you're hiding them they can't subscribe to multiple at once anyway. This will allow them to unselect a parent 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.

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

  • don5420
  • don5420
  • OFFLINE
  • Posts: 55
  • Thanks: 3
  • Karma: 0
11 years 2 months ago #232999 by don5420
Sorry, I was updating my question when you were responding. I already made them not exclusive, but that presents the other issue I described above in my edit. Any thoughts?

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 years 2 months ago #233001 by krileon
There's no way to reset the selection if they're Exclusive. If they're non-Exclusive then the plans are no longer required. Best I can suggest is set all 3 parent plans as Exclusive and simply don't conditionally show/hide the parent plans. As they can only select 1 parent due to them being exclusive it shouldn't be an issue to show all 3.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum