Auto Select Payment Method - Modify

  • Arbind Bhagat
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 month 2 weeks ago - 1 month 2 weeks ago #165528 by Arbind Bhagat
Auto Select Payment Method - Modify was created by Arbind Bhagat
Screenshot attached. When adding a new registrant from the backend, in the payment method, the os_offline payment is auto selected by default when the page first loads. Where is the path of the code that I can change so that another payment method is auto-selected instead? Please let me know.

Last edit: 1 month 2 weeks ago by Arbind Bhagat.

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

More
1 month 2 weeks ago #165530 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Auto Select Payment Method - Modify
Hello

The code is in the file components/com_eventbooking/view/registrant.php, like 362:
Code:
$this->item->payment_method ?: 'os_offline'

Change os_offline to the name of payment method you want. However, keep in mind that the change there will be lost when you update to future releases of the extension

Regards,

Tuan

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

More
1 month 2 weeks ago #165658 by Brian
Replied by Brian on topic Auto Select Payment Method - Modify
Thanks Tuan,

Is there an Override file or folder that we can Add, Create, or Edit so that customizations like this won't be lost with future updates? 
 
Thanks,
Brian

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

  • Arbind Bhagat
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 month 2 weeks ago #165661 by Arbind Bhagat
Replied by Arbind Bhagat on topic Auto Select Payment Method - Modify
I think this could easily be made a part of the configuration.

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

More
1 month 2 weeks ago #165673 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Auto Select Payment Method - Modify
You will need to override the class itself. See docs.joomdonation.com/eventsbooking/deve...thod-in-a-view-class . The class to override is administrator/components/com_eventbooking/view/registrants/html.php

The reason we have it set to offline because if you have it set to an online payment method but the status is not paid, then the record won't be visible (by default) due to the way the extension is designed to work (if you use online payment method but does not pay, you are not counted as registrants)

Regards,

Tuan

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

Moderators: Tuan Pham Ngoc