Show processing fees based on plan

  • Karen Griffin
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 4 months ago - 4 years 4 months ago #136512 by Karen Griffin
Show processing fees based on plan was created by Karen Griffin
Hi-

My client wants to be able to charge a processing fee for some plans and not others. I found where I can override templates to check for the plan id before showing processing fees - under registration: default_payment_information.php, default_payment_information_recurring.php, and under subscriber: default.php.

I have a few questions:

1) I noticed "payment_processing_fee" in default_payment_information.php and "regular_payment_processing_fee" and "trial_payment_processing_fee" in default_payment_information_recurring.php. I want to make sure that under recurring payments, it is the "regular" processing fee on which I need to do the plan id check or if I should do both even though my client has no need for trial subscriptions.

2) I am a bit unsure at the moment where default.php under subscriber fits into the scheme of things, but since processing fees show up there, I am assuming I need to override this template as well. As there is a check !$this->plan->id when determining whether to show the processing fees, I am a bit concerned I will break things if I put in a check for specific plan id's. Can you give me some guidance as to the correct way to change the if clause to keep the integrity of the original check, while adding in a check for specific plan ids?

3) Are there any other templates I missed while searching for which templates I may need to override for this?

Any plans on making the application of processing fees a choice while creating individual plans so this type of override does not need to happen?

Thanks so much.
Last edit: 4 years 4 months ago by Karen Griffin.

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

More
4 years 4 months ago #136573 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Show processing fees based on plan
Hello

1. We don't have plan to make this configurable per plan setting.

2. I have the feeling that the approach you are using is wrong. If you want to turn on/off payment processing fee per plan, you would have to customize code of the two methods in components/com_osmembership/helper/subscription.php, methods:

- calculateRecurringSubscriptionFee
- calculateOnetimeSubscriptionFee

That would be the right places to start.

Tuan

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

  • Karen Griffin
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 4 months ago #136596 by Karen Griffin
Replied by Karen Griffin on topic Show processing fees based on plan
Great. Thank you.

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

More
4 years 4 months ago #136632 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Show processing fees based on plan
OK Karen. Good luck with the development

Tuan

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