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