Support

Home Forums Event Espresso Premium Assign Tickets to a group of users from Backend

Assign Tickets to a group of users from Backend

Posted: May 21, 2015 at 11:29 am

Viewing 2 reply threads


Geoff Murrey

May 21, 2015 at 11:29 am

Hi,
We have a set of events where once a person is joined as a Member they are obliged to pay for and attend. So, it is necessary for the Administrator to assign tickets to these Members for each Event from a button on the Edit Event page that performs this task.

The group in question can be identified by a custom capability ‘buy_member_tickets’ which is applied on a new Role of ‘Member’.

The Ticket Type to assign is labelled ‘Member Ticket’ so these can be differentiated in reports/backend lists.

This also needs to generate the Transaction, so there is an Invoice and therefore a link to pay retrospectively through a payment gateway/external transfer.

Ideally it would also email the Invoice, or link to it.

I’m expecting to do some coding here so really looking for a few pointers on how best to approach this and the EE functions I’ll need.

something like..

on_button () {
evt_id = get_this_event_id();
tkt_id = get_member_ticket_for_event(evt_id);

loop all users where Role=’Member’ {
assign_member_to_event_member_ticket(evt_id, tkt_id, member_id);
}
}

Thanks.


Seth Shoultes

  • Support Staff

May 25, 2015 at 9:10 am

Hello Geoff,

Will the existing admin registration features not work for your needs?


Geoff Murrey

May 25, 2015 at 11:51 am

Hi Seth,
The only admin method I found was ‘Add New Registration’ under ‘Registrations’.
This requires just as much information as adding through the front end, and doesn’t give me an option to get that information from existing users, so to do that 60x every month would be a huge no.
As I said, I’m expecting to have to do coding here so just looking for pointers – i.e. are there existing methods I can call from within the plugin that would simplify the steps I need to take to create the Registration and Transaction records?
I figured this might be quite a common requirement so thought I’d ask the question in case someone had already done the same and might save me a bit of time digging through the code/docs.

Viewing 2 reply threads

The support post ‘Assign Tickets to a group of users from Backend’ 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