Please post all pre-sales questions of all products on this forum

Make DEPOSIT default payment_type

  • James Riley
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 4 months ago #55964 by James Riley
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
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
  • Platinum Member
More
10 years 4 months ago #55965 by James Riley
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
  • Platinum Member
More
10 years 4 months ago #55966 by James Riley
Replied by James Riley on topic Make DEPOSIT default payment_type
Just found that by changing views/register/view.html.php
Code:
167 $paymentType = $input->post->getInt('payment_type', 0); --to-- 167 $paymentType = $input->post->getInt('payment_type', 1);
seems to do the trick!

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.

More
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

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

Moderators: Tuan Pham NgocGiang Dinh TruongMr. Dam