Support

Home Forums Event Espresso Premium Promotion / Early Bird Advice

Promotion / Early Bird Advice

Posted: September 27, 2016 at 4:07 pm


Steve

September 27, 2016 at 4:07 pm

Hi All,

Just looking for some best practice advice. We have an event which is coming to the end of its early bird period. It is the only event on the site. We have multiple ticket types, and our main event pass is subject to the discount. We have other ticket types which don’t have this discount (essentially add-on items to the main ticket…). I’ve discounted them using the ticket level discount inside event edit.

Now we’re approaching the end, we want to maintain the discount for group bookings for specific people only. So I’m looking for a way to offer a discount on event tickets for certain people, which does not discount ALL tickets, only the select tickets:

1) is there a way with the promo add on to only have certain things discounted with a code?
2) Is there a way of setting up a separate “secret” cart page for the event with only discounted tickets on it (e.g. I setup additional tickets with the discount, but only show them on this other ticket selector). I was thinking I could do this the same way you can do admin-only tickets, hidden with CSS. but wasn’t sure if having the two differing cart pages might cause any consistency problems

We can’t use the group booking discount method (e.g. buy 10 get 1) because the bookings although group need to not be paid separately.

Any thoughts welcome!


Lorenzo Orlando Caum

  • Support Staff

September 28, 2016 at 4:38 am

Hello,

Promotions currently target on the event-level so any pricing options under that event would receive a discount.

You could duplicate the event through the event editor and remove the pricing options that should not be available and then add a simple password and save. Then create a discount code that targets only this event.

You could then provide that information to the groups that you want to register under the promotion and then expire the event when it is no longer needed.


Lorenzo


Steve

September 28, 2016 at 10:58 am

Thanks Lorenzo – that could work.

However when checking people in, we’d have two events in the app right? and we’d have to toggle? So we might need to manually transfer those registrations across?


Josh

  • Support Staff

September 28, 2016 at 2:34 pm

However when checking people in, we’d have two events in the app right?
and we’d have to toggle?
So we might need to manually transfer those registrations across?

Yes, and that would not be a good time. Another approach would be to make some new tickets for your “VIP”s, and restrict access to those tickets to a password protected page. Here’s a link to a code snippet from our library that has some example code showing how that can be set up:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/jf_ee_password_protect_ticket.php


Steve

September 29, 2016 at 1:19 pm

Josh I think thats just what I need, thanks… thats what I was getting at with the “CSS code” idea.


Steve

September 29, 2016 at 1:33 pm

Just spotted something – thats for one VIP ticket – is there a way of having more than one?


Tony

  • Support Staff

September 29, 2016 at 5:08 pm

Sure you can.

You change the $VIP_Ticket_ID to be an array:

$VIP_Ticket_IDs = array( 111,222,333,444 )

Then change anywhere that checks the ID from:

$ticket->ID() == $VIP_Ticket_ID

to

in_array( $ticket->ID(), $VIP_Ticket_IDs )

Then if the ticket matches any of the IDs you set in the array it should work.


Steve

October 3, 2016 at 4:30 pm

Hey Tim,

Having some syntax problems with that, I’m no PHP expert (my experience is in Java)

When replacing I get a fatal error. I don’t suppose you could show me the right way to integrate the array statement into the IF inside of the code on git?

If not I fear I might have to go get my PHP book out, and I’m not convinced thats a good idea for anyone!


Tony

  • Support Staff

October 5, 2016 at 9:13 am

Take a look here:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/tw_ee_password_protect_tickets.php

Note this works in the exact same way Josh’s example does, the only difference is it allows you to set multiple tickets and multiple pages if needed.

You add each ID to its respective array and EE will do the rest, so if you have multiple password protected pages for specific tickets you can set the ID’s:

$VIP_Post_IDs = array( 14, 22, 12976 );

THen the tickets that you only want to display on the password pages (if relevant to the event shortcode used:

$VIP_Ticket_IDs = array( 6, 7, 8, 1242, 9852 );


Steve

October 5, 2016 at 3:53 pm

Thanks Tony, I will have another go – I may have made a syntax error somewhere.
I don’t suppose there is a way of controlling the ticket appearance at a per page level easily? So I can have a group booking page personalised to each group? The code above would seem to be site wide so presumably it would expose any group tickets

I guess I could variate the php function name and then change strings for the tickets e.g. Group 1 group 2 etc.

It’d be a great future enhancement to have a parameterized widget for the ticket selector.


Tony

  • Support Staff

October 7, 2016 at 4:30 am

I don’t suppose there is a way of controlling the ticket appearance at a per page level easily? So I can have a group booking page personalised to each group?

If I understand correctly then I don’t think there is anything available that would be easy.

Do have an example of what your trying to achieve I can view?

It’d be a great future enhancement to have a parameterized widget for the ticket selector.

We do have some planned changes for the ticket selector, see here for a couple of options:

https://gist.github.com/joshfeck/158e934023658b12cf9e


Steve

October 12, 2016 at 2:01 pm

Hi Tony,

Because I have different groups booking, it would be nice to have a page for Group 123 Booking (with a title accordingly, and the appropriate tickets, as this group gets our int’l discount) vs group ABC, who are getting a different group deal.

Nothing like making things a bit complicated!

So I’m wondering if I can have the code twice, for page ID 1, with tickets 1,2,3 and page ID 2, with tickets 4,5,6

I hope that made sense


Steve

October 15, 2016 at 5:39 pm

OK this is doing my head in. I’m trying to use the code suggested, but what I’m getting is this:

However the VIP tickets are NOT appearing not he main ticket selector so that portion is working… but I can’t for the life of me figure out why the thing isn’t working on the group page. It appears to be the array specific code, not the regular one with a single page.

This is the code I’m currently using:

function tw_espresso_vip_tickets( $ticket_row_html, EE_Ticket $ticket ) {
    global $post;
    // Array of password protected posts or pages
    $VIP_Post_IDs = array( 340, 344 );
    
    //Array of ticket IDs for the restricted access tickets
    $VIP_Ticket_IDs = array( 27, 41 );

    //Check if the current post ID is within 'VIP_Post_IDs', if so you on a protected page that should display the ticket that have ID's matching those set within $VIP_Ticket_ID's
    if ( $post instanceof WP_Post && ( ( $post->ID != $VIP_Post_IDs && in_array( $ticket->ID(), $VIP_Ticket_IDs ) ) || ( $post->ID == $VIP_Post_IDs && ! in_array( $ticket->ID(), $VIP_Ticket_IDs ) ) ) ) {
        return '';
    }
    return $ticket_row_html;
}
add_filter( 'FHEE__ticket_selector_chart_template__do_ticket_entire_row', 'tw_espresso_vip_tickets', 10, 2 );

Any ideas whats wrong? I could really do with getting this working, but am really struggling now.


Tony

  • Support Staff

October 17, 2016 at 6:42 am

Any ideas whats wrong? I could really do with getting this working, but am really struggling now.

Its happening because I missed a change within the function, it works for a single page but not multiple.

This part, $post->ID != $VIP_Post_IDs and this part $post->ID == $VIP_Post_IDs need to be changed to use the array.

I’ve edited my gist above, line 30 shows the changes:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/tw_ee_password_protect_tickets.php#L30

If you update the code in use on your site does it work as expected then?

So I’m wondering if I can have the code twice, for page ID 1, with tickets 1,2,3 and page ID 2, with tickets 4,5,6

Yes, it can be done.

You would need to break out each group of tickets into their own ‘group array’ and then display only those tickets for specific post ID’s. Basically you will end up with a bunch of if statements looking for specific page ID’s to then display specific tickets.

Start by confirming the above works how you are expecting.


Steve

October 18, 2016 at 4:00 pm

Hurrah – Tony thats working now with that code.

I’ve been trying to break down the if statement, so I can successfully repeat it, but I’m not having much luck (I was looking @ w3 schools but their If/ElseIf definition is a might simpler). Is it possible for you to help with that?

With this and the new attendee mover being able to swap tickets around this is a good EE day 🙂


Josh

  • Support Staff

October 19, 2016 at 8:59 am

Hi Steve,

I’m not quite sure what you’re looking to do by breaking down that if statement, can you explain with a bit more detail, maybe give an example?


Steve

October 19, 2016 at 1:06 pm

Hey!

So I thought it would be nice to have a “custom page” with custom logo and password, URL for each group we want to offer the Group ticket discount to. So I’m trying to split the IF to evaluate the differing page numbers separately.

However I’ve just worked out I don’t need the code to change to do that :face palm: as all the tickets are the same, they’re just on different pageIDs, which happens anyway.

I could, however, do with some advice as to whether I can change it so that it shows some of the “normal” tickets – to allow someone to book our “add-on” tickets at the same time… e.g. we have a separate date time for a party. But without needing to add a specific VIP party ticket, because we’ve now got something like 30 tickets not he go and its getting a bit much to manage!

I’m presuming I just need to remove the bit of the if which evaluates whether a ticket is “normal” and removes it from the page… but I’m not sure which bit that is…


Steve

October 19, 2016 at 1:11 pm

Thinking about it though, it would be nice to be able to control putting certain tickets on certain pages. So to summarise the use cases:

– Be able to control the tickets on each VIP page (by specifying a new array for each page, and having corresponding IF statements for each one)

– Be able to show certain non-VIP tickets on the VIP page so we can spend our add ons.

Thanks for all the help, I really appreciate it! I’m hoping the code you produce will help others in the future!


Josh

  • Support Staff

October 26, 2016 at 11:18 pm

Hi Steve,

Here’s another snippet that should help you accomplish what you’re looking to do:

https://gist.github.com/joshfeck/76fbc79e077622c7a980b951c854d935

It should be pretty straightforward to plug in your page ID’s and ticket ID’s for VIP ticket ID’s for each group, and ticket ID’s that should be displayed everywhere.

The support post ‘Promotion / Early Bird Advice’ 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