Allowing someone to purchase more than one ticket

  • Barbara Schneider
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago - 10 years 11 months ago #61196 by Barbara Schneider
Allowing someone to purchase more than one ticket was created by Barbara Schneider
Hi,

We are using the event bookings extension and have setup an event to sell tickets to a event we are running to raise funds for our
charity organization. Can we setup the form for individual registration to allow an individual to purchase more than one ticket for this event, and if so how can we do this.

Please note that I would rather not use the group registration, if at all possible.

Thank you
Last edit: 10 years 11 months ago by Barbara Schneider.

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

More
10 years 11 months ago - 10 years 11 months ago #61197 by James Riley
Replied by James Riley on topic Allowing someone to purchase more than one ticket
From what I've seen playing with EB on my site, there are 3 ways to go about it.

1) Set the event up for group registration (con: details for each member will need to be entered, unless you set the global configuration option [Collect Members Information in Group Registration] to NO; great option if you don't need individual member's information for any other active event on your site)

2) Add a custom field (with [fee field] and [fee values]-or-[fee formula] set) to allow for user to select the NUMBER OF TICKETS that they would like to purchase (con: EB won't automatically give you a total quantity for number of tickets sold for the entire event -- you'll have to look at all sales and add it up manually. This is the way I usually do it because I also need to do group registrations on my site where I collect all group member information, so turning off [Collect Members Info] as I mentioned in #1 doesn't work for me).

3) Enable EB's shopping cart option (con: user has to go through the register screen multiple times, once for each ticket purchased)

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 :.
Last edit: 10 years 11 months ago by James Riley.

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

More
10 years 11 months ago #61198 by James Riley
Replied by James Riley on topic Allowing someone to purchase more than one ticket
Oops -- I didn't see the "prefer not to use group registration" part of your post before replying. :)

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.

  • Barbara Schneider
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago - 10 years 11 months ago #61274 by Barbara Schneider
Replied by Barbara Schneider on topic Allowing someone to purchase more than one ticket
Hi,

First of all, thank you for your reply. I am in the process of adding a new custom field to my event form

Name - NumberOfTickets
Title - Number of Tickets
Field Type - List
Required - Yes
Date type validation - Integer

and have located the php file the handles display the event registration form. I want to modify the code as follows:

In the php file view.html I want to replace following line

$this->totalAmount = $fees('total_amount');

with the followin line

$this->totalAmount = $fees('total_amount') * NumberOfTickets;

Please note that I have had to replace The square brackets surrounding the total_amount, with a round brackets, as the forum editor
will note display my text with a square bracket.

I am not sure what is the proper way to reference the custom field NumberOfTickets that I created.

Any help would be greatly appreciated.

Thank you
Last edit: 10 years 11 months ago by Barbara Schneider.

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

More
10 years 11 months ago - 10 years 11 months ago #61277 by James Riley
Replied by James Riley on topic Allowing someone to purchase more than one ticket
Usually, I just use the back-end control panels to add and position the custom field. I don't think I've ever had to hack code... for that anyway (I'm always doing something CSS or code wise to tweak other parts of the component) :)
Did you try doing everything from the control panel and found that you needed to add more functionality? I've seen ??outdated?? documentation saying that you have to add custom fields by editing an xml file, which I'm wondering if that is what the first part of your post is indicating.

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 :.
Last edit: 10 years 11 months ago by James Riley.

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

  • Barbara Schneider
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #61279 by Barbara Schneider
Replied by Barbara Schneider on topic Allowing someone to purchase more than one ticket
I need to be able to modify the amount field under the Payment Information Heading, at the bottom of the event registration form, just above the Payment method, to adjust the amount shown to show the event fee x the Number of tickets. I need to know how to reference
this field, and update it.

I starting to realize, as I write this, that I will probably need to write a small piece of javascript code to do this, and add the code to the php script, to get this to work.

Thank you.

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

More
10 years 11 months ago #61281 by James Riley
Replied by James Riley on topic Allowing someone to purchase more than one ticket
In Custom Fields, just set the field up as a Fee field and EB will auto-calculate the price for you.
Make sure your event price is set to the price of 1 ticket, then set your number-of-tickets list field up as follows (in my example, tickets are $20 each):



... Unless you're trying to set EB up so that it ALWAYS and FOREVER calculates (event price * # of tickets) without having to custom define a field for it, which is maybe what you are hoping to do.
For my method above, you will have to set up a new custom field for every event with a different per-ticket price. If you are trying to make it so that front-end users can create events with a ticket price based on the (event price * # of tickets), then you'll have to continue plugging away with your method. You'll need to find & modify the javascript that is already updating the event cost and have it take into account the field you created -- when Taiwan starts their business day, Tuan might be able to help you with that.

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 :.
The following user(s) said Thank You: Tuan Pham Ngoc

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

  • Barbara Schneider
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #61283 by Barbara Schneider
Replied by Barbara Schneider on topic Allowing someone to purchase more than one ticket
Thank you, thank you, thank you!!!!!!!!!!!!!!

I did exactly what you said in your last reply and it works exactly
how we want it to.

You saved me a lot of time and effort to get this to work.

Hopefully I can help you out sometime in the near futur.

Thanks again

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

More
10 years 11 months ago #61284 by James Riley
Replied by James Riley on topic Allowing someone to purchase more than one ticket
You're welcome, you're welcome, you're welcome!!!!!!!!!

It's always nice to know that something is already built in and that you DON'T have to code it yourself. Tuan & team have built a great little piece of software here.

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.

Moderators: Tuan Pham Ngoc