total amount multiplied by number of registrant

More
10 years 3 months ago #40204 by josh
I understand that the point of having group registration is for it to multiply the total $ amount by number of registrants. I am in a situation where I do not want that to happen. I DON'T WANT the total amount to be multiplied by number of registrants. Is this possible?

Thanks!!!!

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

More
10 years 3 months ago #40206 by josh
found the solution. thank you.

found in previous thread. now i cant find the thread!

components/com_eventbooking/views/confirmation/view.html.php


$extraFee = $feeFields->canculateGroupFee($groupId) + $numberRegistrants*JCFields::calculateFee($eventId, 1) ;


Change it to :

$extraFee = $feeFields->canculateGroupFee($groupId) + JCFields::calculateFee($eventId, 1) ;

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

More
10 years 3 months ago #40214 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: total amount multiplied by number of registrant
Not sure what version you are using, but if you are using latest version, the same modifications will be needed in the function processGroupRegistration in the file components/com_eventbooking/models/register.php

Please have a look at that file, see the code and do the remaining modification.

Tuan

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

More
10 years 1 month ago - 10 years 1 month ago #42555 by Nathan Morrow
Replied by Nathan Morrow on topic Re: total amount multiplied by number of registrant
Hi Tuan,

I've just been making this modification in version 1.6.3 of Event Booking and the code has changed slightly so I thought I'd share...

In, components/com_eventbooking/views/confirmation/view.html.php - line 304

Change:
Code:
$extraFee = $feeFields->canculateGroupFee($groupId) + numberRegistrants*EventbookingHelperFields::calculateFee($eventId, 1) ;

To:
Code:
$extraFee = $feeFields->canculateGroupFee($groupId) + EventbookingHelperFields::calculateFee($eventId, 1) ;

In, components/com_eventbooking/models/register.php - line 334

Change:
Code:
$extraFee = $feeFields->canculateGroupFee($groupId) + $numberRegistrants * ventbookingHelperFields::calculateFee($eventId, 1);

To:
Code:
$extraFee = $feeFields->canculateGroupFee($groupId) + EventbookingHelperFields::calculateFee($eventId, 1);

It would be great if in a future version of Event Booking there was a way of setting this in the custom fee field setup - ie. Group Registrations - > multiple fee value by no of registrants -> Yes/No

Reason being, on the site I'm working on, they are selling registrations to outdoor adventures, in this case Abseiling and they have an optional extra of having lunch at a winery nearby... but not everybody in the Group booking will want to pay the extra for a lunch.

So they have a text field set up... "How many people for the Winery lunch" and the fee field calculation is the field value X the cost of the lunch ($65). And for example there might be 10 people in the group, but only 6 want the lunch.

Which works fine for a single registration but of course in the group registration it then multiplies it by the number of registrants...

$65 X 6 (who want the lunch) X 10 (total number of people in the group).

Cheers

Nathan
Last edit: 10 years 1 month ago by Nathan Morrow.

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

More
10 years 1 month ago #42565 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: total amount multiplied by number of registrant
Thanks Nathan for sharing the solution. Yes, that should be a config option in the extension to allow you to change it to Yes/No instead of editing code like that. Will consider adding support for it in the next major releases.

Regards,

Tuan

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

Moderators: Tuan Pham Ngoc