select deposit

  • jkosick
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
9 years 6 months ago #88137 by jkosick
select deposit was created by jkosick
Can the deposit or full payment select be made where they have to pick it? We are losing registrations because they only see the "Full Payment" and don't know to click on the select field to pick "deposit". It would be better for us that they would have to pick it so they can see they have options.

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

More
9 years 6 months ago #88146 by James Riley
Replied by James Riley on topic select deposit
I think that you'll need to make a change at the code level for this. In /components/com_eventbooking/view/register/html.php, you will find TWO occurrences of:
Code:
$paymentType = $input->post->getInt('payment_type', 0); if ($config->activate_deposit_feature) { $options = array(); $options[] = JHtml::_('select.option', 0, JText::_('EB_FULL_PAYMENT')); $options[] = JHtml::_('select.option', 1, JText::_('EB_DEPOSIT_PAYMENT')); $lists['payment_type'] = JHtml::_('select.genericlist', $options, 'payment_type', ' class="input-large" onchange="showDepositAmount(this);" ', 'value', 'text', $paymentType); $depositPayment = 1; }

In BOTH occurrences, add something like this to in a new line above [ $options[] = JHtml::_('select.option', 0, JText::_('EB_FULL_PAYMENT')); ]:
Code:
$options[] = JHtml::_('select.option', '', 'Please click and select FULL PAYMENT or DEPOSIT PAYMENT');

and in BOTH occurences, change the [0] at the end of [ $paymentType = $input->post->getInt('payment_type', 0); ] to match with the second value in the JHtml function (in my above code, it would be the empty string ''):
Code:
$paymentType = $input->post->getInt('payment_type', ''); // force the new '' valued-option to default

The disadvantage is that the user can still proceed without changing this value, but I think the system will process the registration as if they are making full payment (in my test record, the user is logged as selecting Full Payment).

Your final code in BOTH occurrences should look like this:
Code:
$paymentType = $input->post->getInt('payment_type', ''); if ($config->activate_deposit_feature) { $options = array(); $options[] = JHtml::_('select.option', '', 'Please click and select FULL PAYMENT or DEPOSIT PAYMENT');[ $options[] = JHtml::_('select.option', 0, JText::_('EB_FULL_PAYMENT')); $options[] = JHtml::_('select.option', 1, JText::_('EB_DEPOSIT_PAYMENT')); $lists['payment_type'] = JHtml::_('select.genericlist', $options, 'payment_type', ' class="input-large" onchange="showDepositAmount(this);" ', 'value', 'text', $paymentType); $depositPayment = 1; }

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
9 years 6 months ago #88147 by James Riley
Replied by James Riley on topic select deposit
Alternately, if you wanted to make DEPOSIT the default option (which is what I do on my site)...

Don't add the [ $options[]= JHtml... ] line at all, and just change the $paymentType line in BOTH occurrences to read:
Code:
$paymentType = $input->post->getInt('payment_type', 1); // the 1 will force 1 (aka, the Deposit option) to default

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 :.
The following user(s) said Thank You: Tuan Pham Ngoc

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

More
9 years 5 months ago #88160 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic select deposit
Please use the solution which James posted in his later post, it will solve the issue/problem you are having

Tuan

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

Moderators: Tuan Pham Ngoc