Set offline payments as published by default

  • tarik916
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago #39284 by tarik916
I have a customer who bills their customers through a monthly membership and adds purchased event registrations to the monthly bill. They would like offline payment registrations to be published after checkout complete. I don't mind updating code. Where could I do this?

Thank you,

Tarik

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

More
10 years 4 months ago #39319 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Set offline payments as published by default
Hi Tarik

1. Open the file components/com_eventbooking/payments/os_offline.php

2. In the function processPayment, find the code below :
$config = EventbookingHelper::getConfig();

3. Add the following code after that line of code :

$row->published = 1;
$row->store();

After that, it should work as expected.

Tuan

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

  • tarik916
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago #39321 by tarik916
Thank you! That worked perfectly. I was close, but did not realize I was missing the "store()" line.

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

More
10 years 4 months ago #39322 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Set offline payments as published by default
hehe, glad to hear that it works well !

Tuan

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

Moderators: Tuan Pham Ngoc