subscription for free

  • Sigrid
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 2 weeks ago #112382 by Sigrid
subscription for free was created by Sigrid
Hello,
I've got following problem:
we have a plan fee required. Now I want to give a subscription for this plan for free. But always if I enter 0 Euro and save the subscription an invoice is generated and the fee is charged.
Can you tell me, how to gift a subscription for free?
Sigrid

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

More
7 years 2 weeks ago #112404 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic subscription for free
Hi Sigrid

When the amount is 0/empty, no invoice should be generated. Could you please attach a screenshot of what you entered for the subscription record (focus on the amount section) and then the screenshot of that record when you click on to edit (after created) so that I can understand the issue better?

Tuan

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

  • Sigrid
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 2 weeks ago #112415 by Sigrid
Replied by Sigrid on topic subscription for free
Hi Tuan,
here the screenshots
Sigrid
Attachments:

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

More
7 years 2 weeks ago #112416 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic subscription for free
Hmm

The screenshot of add subscription screen is not in English, so I could not understand the input data. However, I think I see the issue now and it will require small modification to the code:

1. Open the file administrator/components/com_osmembership/model/subscription.php

2. Find this line of code (306 in latest version)
Code:
if ($isNew && !$row->amount && $rowPlan)
3. Change it to
Code:
if ($isNew && $row->amount === '' && $rowPlan)

Then try again, if you enter 0 into all amount fields, invoice should not be generated

Tuan

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