- Posts: 240
- Thank you received: 17
Deposit Function
- Donal
- Topic Author
- Offline
- Elite Member
-
Less
More
9 years 1 month ago #94297
by Donal
Deposit Function was created by Donal
Hi,
we run terms of weekly clubs for kids. Prior to the start of the term, people can pay a deposit to secure their place. After the start of the term, we then disable Deposits.
However, we also run Summer camps, which are about to go on sale now, while we are in the middle of a term of clubs. I want people to be able to book their place by paying a deposit.
Unfortunately, the deposit option is only global. Ideally, deposits would be treated like Enable Waiting List/Enable Coupon, with an override option within each event.
If that modification can't be easily made, I would like to make the following customisation... If deposit is enabled, and the deposit to set to 100%, then the Payment Type option is not shown, ie: deposit enabled and deposit amount = total amount, then effectively, there is no deposit option for that event.
Can you please point me to the file(s) where I would need to make this modification? I'm using 2.11.2.
Thanks,
Donal
we run terms of weekly clubs for kids. Prior to the start of the term, people can pay a deposit to secure their place. After the start of the term, we then disable Deposits.
However, we also run Summer camps, which are about to go on sale now, while we are in the middle of a term of clubs. I want people to be able to book their place by paying a deposit.
Unfortunately, the deposit option is only global. Ideally, deposits would be treated like Enable Waiting List/Enable Coupon, with an override option within each event.
If that modification can't be easily made, I would like to make the following customisation... If deposit is enabled, and the deposit to set to 100%, then the Payment Type option is not shown, ie: deposit enabled and deposit amount = total amount, then effectively, there is no deposit option for that event.
Can you please point me to the file(s) where I would need to make this modification? I'm using 2.11.2.
Thanks,
Donal
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
9 years 1 month ago - 9 years 1 month ago #94308
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 Deposit Function
There are several places in the code where the value of $config->activate_deposit_feature is checked. I think these occurrances below are the ones you'll need to worry about though.
You could also try to override in components\com_eventbooking\view\register\register_payment_amount.php where the deposit info is displayed (search that file for if ($this->depositPayment) ) instead of the above html.php and/or raw.php files, but there are several variable values set within html/raw.php that might be instrumental to the way that the deposit feature works, and overriding the tmpl file may not be effective because these variables had still been set. Making the system believe that deposit feature was off completely might be the safer way to disable it event by event. That said, editing register_payment_amount.php might work just fine and would be easier, so it could be worth trying it anyway.
| FILE NAME | CODE TO LOOK FOR |
| components\com_eventbooking\view\register\html.php | if ($config->activate_deposit_feature && $event->deposit_amount > 0) |
| components\com_eventbooking\view\register\html.php | if ($config->activate_deposit_feature) |
| components\com_eventbooking\view\register\raw.php | if ($config->activate_deposit_feature && $event->deposit_amount > 0) |
You could also try to override in components\com_eventbooking\view\register\register_payment_amount.php where the deposit info is displayed (search that file for if ($this->depositPayment) ) instead of the above html.php and/or raw.php files, but there are several variable values set within html/raw.php that might be instrumental to the way that the deposit feature works, and overriding the tmpl file may not be effective because these variables had still been set. Making the system believe that deposit feature was off completely might be the safer way to disable it event by event. That said, editing register_payment_amount.php might work just fine and would be easier, so it could be worth trying it anyway.
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: 9 years 1 month ago by James Riley.
Please Log in or Create an account to join the conversation.
- Donal
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 240
- Thank you received: 17
9 years 1 month ago #94311
by Donal
Replied by Donal on topic Deposit Function
Hi James,
thanks for the help. That identified the issue. I think it is a small bug... I changed
if ($config->activate_deposit_feature)
to
if ($config->activate_deposit_feature && $event->deposit_amount > 0)
in the displayCart() method, and now the behaviour is as I would expect (if deposit = 0, then that means no deposit) and is consistent with Event booking if you don't use the cart
Tuan, can you include this bug fix in your normal release?
Regards,
Donal
thanks for the help. That identified the issue. I think it is a small bug... I changed
if ($config->activate_deposit_feature)
to
if ($config->activate_deposit_feature && $event->deposit_amount > 0)
in the displayCart() method, and now the behaviour is as I would expect (if deposit = 0, then that means no deposit) and is consistent with Event booking if you don't use the cart
Tuan, can you include this bug fix in your normal release?
Regards,
Donal
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
9 years 1 month ago #94327
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Deposit Function
Thanks. I will review the changes and if it is valid, it will be included in the next release
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
9 years 1 month ago #94431
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Deposit Function
Hello Donal
Looking at it again, I think your change is not correct. With that change, deposit payment will always be OFF. The reason is because on shopping cart mode, we don't have $event variable available
The way the extension is handling deposit payment for Individual and Group registration is actually correct now. I made modification to the case shopping cart so that deposit payment will only be enabled if at least one event in cart has deposit amount > 0
Please try to get this file, unzip it, upload to components/com_eventbooking/view/register folder
After that, check it again. It should work as expected. This change, after being tested, will be included into next release of Events Booking
Regards,
Tuan
Looking at it again, I think your change is not correct. With that change, deposit payment will always be OFF. The reason is because on shopping cart mode, we don't have $event variable available
The way the extension is handling deposit payment for Individual and Group registration is actually correct now. I made modification to the case shopping cart so that deposit payment will only be enabled if at least one event in cart has deposit amount > 0
Please try to get this file, unzip it, upload to components/com_eventbooking/view/register folder
After that, check it again. It should work as expected. This change, after being tested, will be included into next release of Events Booking
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Donal
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 240
- Thank you received: 17
9 years 1 month ago #94478
by Donal
Replied by Donal on topic Deposit Function
Hi Tuan,
thanks for the update. Will this work with 2.11.2 or do I need to update?
Regards,
Donal
thanks for the update. Will this work with 2.11.2 or do I need to update?
Regards,
Donal
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
9 years 1 month ago #94482
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Deposit Function
I modified code base on the code from latest version 2.13.2, so I am not sure. You should update to latest version if it is possible
If not, make a backup of the original file, then upload the new file, then test it and make sure everything works as expected
Tuan
If not, make a backup of the original file, then upload the new file, then test it and make sure everything works as expected
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2026 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.