Showing the payment_date field

More
5 years 1 week ago #124236 by Roger Clarke
Replied by Roger Clarke on topic Showing the payment_date field
Hi Tuan,

I'm on 2.17.1 of membership Pro.

I've just had a look in the code for the subscription model. The following piece of code is in function store:
if (!$row->payment_date || $row->payment_date == $nullDate)
{
$row->payment_date = JFactory::getDate()->toSql();
}
//Membership active, trigger plugin
$app->triggerEvent('onMembershipActive', array($row));

But in function publish there is no code to set the payment date - it just calls the trigger. Could this be what is causing what I am seeing?

I have exactly the same issue with an admin performing a renewal for a membership subscription - there is no payment date set for the new subscription record.

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

  • Hilmar Schneider
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 1 week ago - 5 years 5 days ago #124241 by Hilmar Schneider
Replied by Hilmar Schneider on topic Showing the payment_date field
I'm using version 2.17.1 of Membership Pro as well.
Last edit: 5 years 5 days ago by Hilmar Schneider.

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

More
5 years 1 week ago #124245 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Showing the payment_date field
Sorry, my bad, I checked code of Events Booking, not Membership Pro. I just updated code on server with the change which should address the issue

Please access to My Downloads menu item, download latest package, upgrade it to your site, then check it again. The error should be gone

Regards,

Tuan

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

More
5 years 1 week ago #124262 by Roger Clarke
Replied by Roger Clarke on topic Showing the payment_date field
Thanks Tuan, that has fixed the problem with the Publish button.

Are you able to do the same for the Renew Subscription button that the administrator can use to renew a member's subscription? At present it creates the new subscription record with all the right details including os_offline as the payment method but I really need the payment_date set if the administrator actions a renewal this way.

Thanks again,
Roger

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

  • Hilmar Schneider
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 11 months ago #124577 by Hilmar Schneider
Replied by Hilmar Schneider on topic Showing the payment_date field
Any updates to this issue? I already had version 2.17.1. Was the code updated without a version change? We use the renew subscription button to update a subscription.

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

More
4 years 11 months ago #124580 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Showing the payment_date field
Hi

I just updated code to set payment_date for renewal as well. Please access to My Downloads menu item, download latest package, upgrade it to your site, then check it again. It will work well. And Yes, I won't release new version for this small change, so the version will still be the same 2.17.1

Regards,

Tuan

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

  • Hilmar Schneider
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 11 months ago #124590 by Hilmar Schneider
Replied by Hilmar Schneider on topic Showing the payment_date field
It works like it should now. Thanks.

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

More
4 years 11 months ago #124591 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Showing the payment_date field
Great. Thanks for confirming

Tuan

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

More
4 years 11 months ago #124605 by Roger Clarke
Replied by Roger Clarke on topic Showing the payment_date field
Thanks for the fix from me too.

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

More
4 years 11 months ago #124622 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Showing the payment_date field
Thanks for confirming that it works :)

Tuan

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