Support

Home Forums Event Espresso Premium Best practice on adding a combo event tickets

Best practice on adding a combo event tickets

Posted: October 26, 2020 at 5:20 am

Viewing 8 reply threads


hodyhong

October 26, 2020 at 5:20 am

Hi there,

I’m looking to find a best practice to add two event tickets at the same time as a purchase combo. The details as follow:

Event 1, two options: one day pass and 3 day pass, different price
Event 2, comes free with event 1, multiple datetime to select.

If I would like to add them both at the same time, what hook / js function should I be looking for?

Stay safe.
Cheers

Hody


Tony

  • Support Staff

October 27, 2020 at 4:36 am

Hi Hody,

We don’t currently have the option to have ‘events within events’ or events that reply on other events etc and one thing that complicates your request is ‘multiple DateTime to select’ on Event 2.

You don’t select a DateTime, you select a ticket which grants access to a DateTime, so if you want a user to select a specific DateTime, they actually select a ticket assigned only to that specific DateTime rather than selecting a ticket and then selecting which DateTime their registration applies to.

That means you can’t simply add Ticket A from Event 1 and then Ticket B from Event 2 as you don’t know which DateTime Ticket B should be for.

Having said that if you want to view how tickets are added to the cart I recommend taking a look into:

\event-espresso-core-reg\modules\ticket_selector\ProcessTicketSelector.php

To see how EE core process ticket selections and then:

\eea-multi-event-registration\EED_Multi_Event_Registration.module.php

To view how the cart process ticket selections.

I’ll check with one of the developers to confirm which hook they would recommend using but I don’t think the above is going to be as simple as it sounds.


hodyhong

October 27, 2020 at 6:26 am

Hi Tony, perhaps I have confused you with the complexity of my intent.

Both events are already in place perfectly. I simply need to add them to the cart at the same time to avoid customer going into two events to do so.

I just try to get an insight from you guys which is the best method to do so.
Although the two events are quite different in nature. So it will requires a bit of different handling.

Look forward to hearing from you and your team.

Hody


Tony

  • Support Staff

October 27, 2020 at 6:57 am

I don’t think I’m confused here, I understand that you want to add 2 events to the cart but you mention ‘multiple datetime to select’, which complicates this request.

How are you expecting the user to select the datetime from Event 2 when its automatically added to the cart?

Both events are already in place perfectly. I simply need to add them to the cart at the same time to avoid customer going into two events to do so.

Again, currently, we don’t have a method to add multiple events to the cart in a single step. The above 2 functions process the ticket selection request depending on if you are using MER or not (and you’ll need to for you setup) but it expects a single event on each individual request sent to the method.

There is a hook fired after the ticket selection has been added to the cart AHEE__EE_Ticket_Selector__process_ticket_selections__after_tickets_added_to_cart which you could use to check the current contents of the cart and if Event 1 was added you can add Event 2 but again, ‘datetime selection’ changes this.

I just try to get an insight from you guys which is the best method to do so.

Can you link me to the 2 events so I can see what you set up is?


hodyhong

October 27, 2020 at 8:46 am

Hi Tony, thanks for your reply.

How are you expecting the user to select the datetime from Event 2 when its automatically added to the cart?

So my thought on the current workflow goes like this:

  1. The user select event 1 on day passes (which is two datetime basically)
  2. The user select event 2 on which datetime they want
  3. The user select ticket type (let’s say adult or concession), this will set both events’ ticket type
  4. The user Add both tickets to cart

Essentially they are both datetime base events. And yes I’ve got MER set up already.

I will try set something up today tomorrow and link it through. The covid situation has made organising events extremely complex. Sorry about the confusion and thanks for the help.

H


hodyhong

October 27, 2020 at 10:39 pm

Hi Tony, these are the two events:

Event 1
https://ballaratfoto.org/events/day-pass-event-step-2/

Event 2
https://ballaratfoto.org/events/main-ticketing-event/

As previously mentioned, the two events should be purchased as a combo, also mirroring ticketing options and numbers.

Look forward to hearing your thought.


hodyhong

October 28, 2020 at 8:42 pm

Addition to my last post, I’m currently exploring the possibility on using REST API to add these tickets to cart. Would it be the easier way to do?


hodyhong

November 4, 2020 at 8:57 am

The last piece of information I could find about using the REST API was this post: https://eventespresso.com/topic/register-user-via-api-call/ But this seems to rely on creating a user as well and didn’t work for the OP. Is there any documentation for adding a ticket to the cart through a post to the REST API?


hodyhong

November 9, 2020 at 8:53 am

Hi there, it has been a while, could you please give me some response or direction on the matter?

Viewing 8 reply threads

The support post ‘Best practice on adding a combo event tickets’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso