Deposit Function

  • Donal
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
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

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

More
9 years 1 month ago - 9 years 1 month ago #94308 by James Riley
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.
FILE NAMECODE TO LOOK FOR
components\com_eventbooking\view\register\html.phpif ($config->activate_deposit_feature && $event->deposit_amount > 0)
components\com_eventbooking\view\register\html.phpif ($config->activate_deposit_feature)
components\com_eventbooking\view\register\raw.phpif ($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
  • Elite Member
More
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

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
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

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
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

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

  • Donal
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
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

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
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

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

Moderators: Tuan Pham Ngoc