Ticket Types and Custom (Fee) Fields

  • ThomasM
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 10 months ago #99212 by ThomasM
Ticket Types and Custom (Fee) Fields was created by ThomasM
Hi,
I chose EB because with its features, functions and plugins it's superior out of the box than similar extensions for a client's specific use case I'm working on, plus the support here made a positive impression - so, first a big compliment for the dev team's work!
I'm still relatively new to it (~2 months), but find it easy to customise/override the code for the purpose. So far... except now I'm running into limitations, wondering how to overcome them.

I'm using multiple Ticket Types per event with different capacities and pricing, which works fine. But now I need a simple (e.g. single checkbox) option for the registrant - best one per Ticket Type, but at least one per booking - which, when selected, increases the ticket price(s) by a percentage.
Again, a checkbox per Ticket Type would be best, but at the very least, a registrant should be able to e.g. check a box per booking, resulting in the net "[AMOUNT]" to be increased by a certain percentage.
Just FYI, the percentage is always the same for all events and Ticket Types, and I need no other fee fields; which may make it simpler in this case.

Thought that Custom Fee Fields were the answer but now realise, also from another forum post, that they can only add $ amounts, not %. MAJOR DRAWBACK! :(
Maybe I'm overlooking another way of achieving it, and then I'd be thankful for a clear hint.

If it'll take customisation:
Been looking through the code a bit already, but while other mods were fairly simple, I seem to be unable to find where things are happening. Unfortunately, I can't wait several more weeks or even months for a solution in a distant future version; so, here I am:

1. Ideal solution = sort of "custom field per ticket type":
I can add a checkbox to the ticket part of the register/booking form (default_tickets.php), but how could I effectively cause the value (e.g. checked = 1) to be stored with the ticket (I guess in an add'l column in #__eb_registrant_tickets, or perhaps better in a new joined table), plus alter the math so that the ticket price is +x%, or times factor 1.x?

alternatively, or "minimum":
2. Custom (fee) field per booking/registration:
When selected, the net amount gets increased by x%.

I'm fine with making it a "hack" in core files, if necessary. Either way, at least some pointers to where and what to act on would be appreciated very much.

Many thanks in advance!

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

More
8 years 10 months ago #99267 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Ticket Types and Custom (Fee) Fields
I think 2 would be simpler. And for sure, you will have to read and hack the code. The code for calculating the fee is located in components/com_eventbooking/helper/helper.php, method calculateIndividualRegistrationFee

Try to look at it and start doing the customization

Regards,

Tuan
The following user(s) said Thank You: ThomasM

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

Moderators: Tuan Pham Ngoc