Please post all pre-sales questions of all products on this forum
Make DEPOSIT default payment_type
- James Riley
-
Topic Author
- Offline
- Platinum Member
-
Less
More
10 years 4 months ago #55964
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Make DEPOSIT default payment_type was created by James Riley
I want DEPOSIT to be the default [payment_type] option on all my events instead of FULL PAYMENT.
I've been digging around in both the Configuration panels and the code, but can't seem to find a way to make it work. Is there a config option that I am missing somewhere? Or would it have to be something that I'd have to change at code level (which I'm willing to do, but it makes upgrading to the next version a bit of a pain)?
In code, for example, I've tried swapping line 171 <--> 172 in views\register\view.html.php
... in hopes that the first item will be the default, but FULL PAYMENT (now option #2) still gets defaulted to. There is also the question: even if I could get DEPOSIT to default, would it show the [deposit_amount] box above that becomes visible via a [payment_type] -> onChange call???
Any suggestions are appreciated!
I've been digging around in both the Configuration panels and the code, but can't seem to find a way to make it work. Is there a config option that I am missing somewhere? Or would it have to be something that I'd have to change at code level (which I'm willing to do, but it makes upgrading to the next version a bit of a pain)?
In code, for example, I've tried swapping line 171 <--> 172 in views\register\view.html.php
Code:
171 $options[] = JHtml::_('select.option', 0, JText::_('EB_FULL_PAYMENT'));
172 $options[] = JHtml::_('select.option', 1, JText::_('EB_DEPOSIT_PAYMENT'));
-- to --
171 $options[] = JHtml::_('select.option', 1, JText::_('EB_DEPOSIT_PAYMENT'));
172 $options[] = JHtml::_('select.option', 0, JText::_('EB_FULL_PAYMENT'));
... in hopes that the first item will be the default, but FULL PAYMENT (now option #2) still gets defaulted to. There is also the question: even if I could get DEPOSIT to default, would it show the [deposit_amount] box above that becomes visible via a [payment_type] -> onChange call???
Any suggestions are appreciated!
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Please Log in or Create an account to join the conversation.
- James Riley
-
Topic Author
- Offline
- Platinum Member
-
10 years 4 months ago #55965
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic Make DEPOSIT default payment_type
Oops! Wrong category!! Sorry

James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Please Log in or Create an account to join the conversation.
- James Riley
-
Topic Author
- Offline
- Platinum Member
-
10 years 4 months ago #55966
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic Make DEPOSIT default payment_type
Just found that by changing views/register/view.html.php
seems to do the trick!
Is there an option in Configuration for this? Could it be a feature request???
Code:
167 $paymentType = $input->post->getInt('payment_type', 0);
--to--
167 $paymentType = $input->post->getInt('payment_type', 1);
Is there an option in Configuration for this? Could it be a feature request???
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
10 years 4 months ago #55985
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Make DEPOSIT default payment_type
Hi James
We don't have a config for this option at the moment, so please just use the solution you found. It is correct.
Regards,
Tuan
We don't have a config for this option at the moment, so please just use the solution you found. It is correct.
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc, Giang Dinh Truong, Mr. Dam
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.