- Posts: 17
- Thank you received: 0
Checkbox default value fee not added to price
- pietklerckx
- Topic Author
- Offline
- New Member
-
Less
More
7 years 8 months ago #103030
by pietklerckx
Checkbox default value fee not added to price was created by pietklerckx
Hi Tuan,
I have an even with a custom field (checkbox), where you can select which books you want to in- or exclude. Each book has an additional price. By default, all the checkboxes are selected, but their values are not added to the price by default. Users have to deselect and then reselect the checkbox in order to process the price.
For example I have an event Workshop with the price of $100,-
I have a custom checkbox field:
Values:
Book 1 $10,-
Book 2 $10,-
Book 3 $10,-
Default Values:
Book 1 $10,-
Book 2 $10,-
Book 3 $10,-
Fee Field: Yes
Fee Values:
10
10
10
The event price at the bottom shows $100,-, but should be $130,- because all the checkboxes are checked by default.
Please help
Piet
I have an even with a custom field (checkbox), where you can select which books you want to in- or exclude. Each book has an additional price. By default, all the checkboxes are selected, but their values are not added to the price by default. Users have to deselect and then reselect the checkbox in order to process the price.
For example I have an event Workshop with the price of $100,-
I have a custom checkbox field:
Values:
Book 1 $10,-
Book 2 $10,-
Book 3 $10,-
Default Values:
Book 1 $10,-
Book 2 $10,-
Book 3 $10,-
Fee Field: Yes
Fee Values:
10
10
10
The event price at the bottom shows $100,-, but should be $130,- because all the checkboxes are checked by default.
Please help
Piet
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
7 years 8 months ago #103033
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Checkbox default value fee not added to price
Hi Piet
That's strange to me. Could you please submit a support ticket sending us super admin account and the link to registration form so that our developer can check it?
Tuan
That's strange to me. Could you please submit a support ticket sending us super admin account and the link to registration form so that our developer can check it?
Tuan
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
7 years 8 months ago #103041
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 Checkbox default value fee not added to price
I can confirm having similar issues in the past with this. I came up with a workaround rather than report it at the time (make the fee check boxes conditional to another checkbox field that was OFF by default and required the user to check it to reveal the pay fields, which then did calculate properly when they revealed) because I needed it running right then and there, and then forgot to report it.
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.
- Tuan Pham Ngoc
- Offline
- Administrator
-
7 years 8 months ago #103055
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Checkbox default value fee not added to price
I think I figured out the error (Thanks James for confirming the error). Could you please get this file, unzip it, upload to folder administrator\components\com_eventbooking\libraries\rad\form and let us know the result? If it works well, I will update it to the package in the next release
Regards,
Tuan
Regards,
Tuan
Attachments:
The following user(s) said Thank You: pietklerckx
Please Log in or Create an account to join the conversation.
- pietklerckx
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
7 years 8 months ago #103065
by pietklerckx
Replied by pietklerckx on topic Checkbox default value fee not added to price
Thank you very much! This fix seems to be working.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
7 years 8 months ago #103066
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Checkbox default value fee not added to price
Great. Thanks for confirming. I will update it to the package for next release, then
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- pietklerckx
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
7 years 2 months ago #109462
by pietklerckx
Replied by pietklerckx on topic Checkbox default value fee not added to price
Hi Tuan,
I've found out that the fix did not get through to the new packages. I've updated the extension to version 3.2.1 and the custom fields were not calculated.
I've updated the fomr.php file with this:
/**
* Bind data into form fields
*
* @param array $data
* @param bool $useDefault
*
* @return $this
*/
public function bind($data, $useDefault = false)
{
foreach ($this->fields as $field)
{
if (isset($data[$field->name]))
{
$field->setValue($data[$field->name]);
}
else
{
if ($useDefault || ($field->type == 'Message'))
{
if ($field->type == 'Checkboxes')
{
$field->setValue(explode("\r\n", $field->row->default_values));
}
else
{
$field->setValue($field->row->default_values);
}
}
else
{
$field->setValue(null);
}
}
}
return $this;
}
And it works again. Please update the package
thanks
I've found out that the fix did not get through to the new packages. I've updated the extension to version 3.2.1 and the custom fields were not calculated.
I've updated the fomr.php file with this:
/**
* Bind data into form fields
*
* @param array $data
* @param bool $useDefault
*
* @return $this
*/
public function bind($data, $useDefault = false)
{
foreach ($this->fields as $field)
{
if (isset($data[$field->name]))
{
$field->setValue($data[$field->name]);
}
else
{
if ($useDefault || ($field->type == 'Message'))
{
if ($field->type == 'Checkboxes')
{
$field->setValue(explode("\r\n", $field->row->default_values));
}
else
{
$field->setValue($field->row->default_values);
}
}
else
{
$field->setValue(null);
}
}
}
return $this;
}
And it works again. Please update the package
thanks
Please Log in or Create an account to join the conversation.
- pietklerckx
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
7 years 1 month ago #110740
by pietklerckx
Replied by pietklerckx on topic Checkbox default value fee not added to price
Still missing in version 3.3.0. Please add
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
7 years 1 month ago #110741
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Checkbox default value fee not added to price
Sorry, I forgot to add it to the package. I will work on it tonight or lately on tomorrow morning so it won't be lost next time you update the extension
Sorry for the inconvenience
Regards,
Tuan
Sorry for the inconvenience
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
7 years 1 month ago #110745
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Checkbox default value fee not added to price
Just want to update that this fix is now applied to download package on server
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
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.