Default the "Pay the Payment Gateway Fee" option to NO
- James Riley
-
Topic Author
- Offline
- Platinum Member
-
Less
More
5 years 7 months ago - 5 years 7 months ago #126946
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 :.
Default the "Pay the Payment Gateway Fee" option to NO was created by James Riley
I want the Pay Gateway Fee option that the user sees on the donation form to default to NO, instead of YES.
I found that I can force it by editing JoomDonation's view\donation\html.php file and changing the "1" at the end of this line to "0":
but this is not an update-safe edit and will get overwritten every time the extension is updated.
Please add a configuration toggle to change the default behavior!
Also, it would be great if the user was shown the actual additional amount that they will be changed. I have set my description text to include mention of the percentage that they will be charged if they select "yes", but that means they have to do the math and think about what it will cost them.
Thanks!
I found that I can force it by editing JoomDonation's view\donation\html.php file and changing the "1" at the end of this line to "0":
Code:
$lists['pay_payment_gateway_fee'] = JHtml::_('select.booleanlist', 'pay_payment_gateway_fee', ' class="inputbox" ', $input->getInt('pay_payment_gateway_fee', 1)) ; // CHANGE "1" (YES) to "0" (NO) to change the default selection
Please add a configuration toggle to change the default behavior!
Also, it would be great if the user was shown the actual additional amount that they will be changed. I have set my description text to include mention of the percentage that they will be charged if they select "yes", but that means they have to do the math and think about what it will cost them.
Thanks!
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 :.
Last edit: 5 years 7 months ago by James Riley.
Please Log in or Create an account to join the conversation.
- Dave B
-
- Offline
- Platinum Member
-
5 years 7 months ago #126963
by Dave B
Replied by Dave B on topic Default the "Pay the Payment Gateway Fee" option to NO
I have been asking for this for two years. Thanks for agreeing with me that it's a needed setting if you are going to have this at all.
Please Log in or Create an account to join the conversation.
- James Riley
-
Topic Author
- Offline
- Platinum Member
-
5 years 7 months ago - 5 years 7 months ago #126980
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 Default the "Pay the Payment Gateway Fee" option to NO
Here's an upgrade-safe hack for this issue. Even though this works, this really should be a configuration option.
Assuming you don't already have a template override in place, navigate to /components/com_jdonation/view/donation/tmpl/ and grab either simpleflow_layout.php or default.php (depending on which layout you use). Save a copy of this file into /templates/YOUR-TEMPLATE/html/com_jdonation/donation/.
Open this copied file, and search for:
Above that line of code, paste the following:
Basically, this code does a search for the "checked" property and removes it. Then it looks for the "NO / value=0" radio button and adds the "checked" property to it instead.
Assuming you don't already have a template override in place, navigate to /components/com_jdonation/view/donation/tmpl/ and grab either simpleflow_layout.php or default.php (depending on which layout you use). Save a copy of this file into /templates/YOUR-TEMPLATE/html/com_jdonation/donation/.
Open this copied file, and search for:
Code:
<div class="<?php echo $controlGroupClass;?>" id="pay_payment_gateway_fee_div">
Above that line of code, paste the following:
Code:
<?php // CHANGE THE DEFAULT VALUE OF THE "PAY DONATION FEE" OPTION TO "NO"
$this->lists['pay_payment_gateway_fee'] = str_replace('checked="checked"','',$this->lists['pay_payment_gateway_fee']);
$this->lists['pay_payment_gateway_fee'] = str_replace('value="0"','value="0" checked="checked"',$this->lists['pay_payment_gateway_fee']);
?>
Basically, this code does a search for the "checked" property and removes it. Then it looks for the "NO / value=0" radio button and adds the "checked" property to it instead.
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 :.
Last edit: 5 years 7 months ago by James Riley. Reason: formatting
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Dũng Nguyễn Việt
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.