- Posts: 42
- Thank you received: 0
Extra services
- Sebastian Hoffmann
- Topic Author
- Offline
- Senior Member
-
Less
More
8 years 8 months ago #101884
by Sebastian Hoffmann
Extra services was created by Sebastian Hoffmann
Hello,
I have a very special problem:
I need a checkbox for extra services for each event with depending prices. For this I have created a custom field in the additional information tabs of the event and a custom field in the registration formular. Now I have modified the register view to show the price of the extra service next to the checkbox. The only problem now is that the total amount also needs so be modified. Can you please help me with this problem?
Best regards
Sebastian
I have a very special problem:
I need a checkbox for extra services for each event with depending prices. For this I have created a custom field in the additional information tabs of the event and a custom field in the registration formular. Now I have modified the register view to show the price of the extra service next to the checkbox. The only problem now is that the total amount also needs so be modified. Can you please help me with this problem?
Best regards
Sebastian
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 8 months ago #101893
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Extra services
Hmm
Isn't custom fee fields can be used without modifying the code?
Could you please read documentation at eventbookingdoc.joomservices.com/basic-s...ct-custom-field-type to see whether you can setup without customizing the code?
Tuan
Isn't custom fee fields can be used without modifying the code?
Could you please read documentation at eventbookingdoc.joomservices.com/basic-s...ct-custom-field-type to see whether you can setup without customizing the code?
Tuan
Please Log in or Create an account to join the conversation.
- Sebastian Hoffmann
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 0
8 years 8 months ago #101897
by Sebastian Hoffmann
Replied by Sebastian Hoffmann on topic Extra services
It is a bit different, because the fee should not be selectable for the customer. E.g. the extra service for two products varies in quality. So the customer can only select the extra service but not the quality.
Best regards
Sebastian
Best regards
Sebastian
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 8 months ago #101935
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Extra services
I would say that it is hard to implement something like this. You will have to modify code so that when someone click on the option, it will call the javascript function calculateIndividualRegistrationFee
You will need to check and make sure the data of that option is passed to the request.Also, you will need to modify code in components/com_eventbooking/helper/registration.php , method calculateIndivudualRegistration fee to have the fee calculated in the way you want
(In Events Booking 2.x, the file is components/com_eventbooking/helper/helper.php)
That's for individual registration only. For group registration, there are other code needed...
Tuan
You will need to check and make sure the data of that option is passed to the request.Also, you will need to modify code in components/com_eventbooking/helper/registration.php , method calculateIndivudualRegistration fee to have the fee calculated in the way you want
(In Events Booking 2.x, the file is components/com_eventbooking/helper/helper.php)
That's for individual registration only. For group registration, there are other code needed...
Tuan
Please Log in or Create an account to join the conversation.
- Sebastian Hoffmann
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 0
8 years 8 months ago #101948
by Sebastian Hoffmann
Replied by Sebastian Hoffmann on topic Extra services
The individual registration would be enough in my case. I already tried to modify helper.php but I don't know how to access the event in this static context.
The function calculateIndividualRegistrationFee is automatically called when I click the custom field but I have to change the value of the field. So the function should use the value of the custom field from the additional information tab instead of the value of the custom field in the formular. Or is this not possible?
Best regards
Sebastian
The function calculateIndividualRegistrationFee is automatically called when I click the custom field but I have to change the value of the field. So the function should use the value of the custom field from the additional information tab instead of the value of the custom field in the formular. Or is this not possible?
Best regards
Sebastian
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 8 months ago #101972
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Extra services
I still don't know exactly what you are trying to do, so I don't know if it is possible. The method calculateIndividualRegistrationFee in the helper file has a parameter called $event which contains all the event data, so you should be able to get any data you want from the event
Maybe you can send me the link to registration form and explain exactly what you are trying to do so that I can look at it before we discuss further
Tuan
Maybe you can send me the link to registration form and explain exactly what you are trying to do so that I can look at it before we discuss further
Tuan
Please Log in or Create an account to join the conversation.
- Sebastian Hoffmann
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 0
8 years 7 months ago - 8 years 7 months ago #102046
by Sebastian Hoffmann
Replied by Sebastian Hoffmann on topic Extra services
I try to explain it a bit more specificly:
We offer a service for each training which is called individual support (it is something like coaching). And this coaching varies in scope. So the price can be different for this coaching in different trainings.
I tried to modify the method calculateIndividualRegistrationFee:
foreach ($event->paramData as $customFieldName => $param)
{
if($customFieldName != "EB_KOSTEN")
$feeCalculationTags[strtoupper($customFieldName)] = $filterInput->clean($param, 'float');
else
$feeCalculationTags[strtoupper($customFieldName)]= json_decode($event->params)->field_kosten1;
}
I think it should be something like this, but my condition is never true. Can you please give me a thought-provoking impulse?
Best regards
Sebastian
We offer a service for each training which is called individual support (it is something like coaching). And this coaching varies in scope. So the price can be different for this coaching in different trainings.
I tried to modify the method calculateIndividualRegistrationFee:
foreach ($event->paramData as $customFieldName => $param)
{
if($customFieldName != "EB_KOSTEN")
$feeCalculationTags[strtoupper($customFieldName)] = $filterInput->clean($param, 'float');
else
$feeCalculationTags[strtoupper($customFieldName)]= json_decode($event->params)->field_kosten1;
}
I think it should be something like this, but my condition is never true. Can you please give me a thought-provoking impulse?
Best regards
Sebastian
Last edit: 8 years 7 months ago by Sebastian Hoffmann.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 7 months ago #102080
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Extra services
What's the purpose of the above code? Please note that $feeCalculationTags just give a list of tags can be used in fee formula for custom fee field (
eventbookingdoc.joomservices.com/basic-s...ds/custom-fee-fields
)
As I said, it is better if you can send us the link to registration form, then understand how the fee will be calculated. I need to understand your requirement before guiding you further
Right now, I still don't know what you are trying to do
Tuan
As I said, it is better if you can send us the link to registration form, then understand how the fee will be calculated. I need to understand your requirement before guiding you further
Right now, I still don't know what you are trying to do
Tuan
Please Log in or Create an account to join the conversation.
- Sebastian Hoffmann
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 0
8 years 7 months ago #102091
by Sebastian Hoffmann
Replied by Sebastian Hoffmann on topic Extra services
Here is an example link:
www.neulandpartner.de/seminarprogramm/se...ividual-registration
The 100 in the registration form is from the "Zusatzinformationen" tab in the picture. So when I check the checkbox 100 should be added. In other registration forms the price of the checkbox should be 400.
Best regards
Sebastian
www.neulandpartner.de/seminarprogramm/se...ividual-registration
The 100 in the registration form is from the "Zusatzinformationen" tab in the picture. So when I check the checkbox 100 should be added. In other registration forms the price of the checkbox should be 400.
Best regards
Sebastian
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 7 months ago #102100
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Extra services
On the form, there is some checkboxes. What checkbox you are talking about? I still don't understand why you don't create checkbox custom fee field manually so that you don't have to edit the code?
Tuan
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.