Support

Home Forums Event Espresso Premium Visual difference between tickets for same event

Visual difference between tickets for same event

Posted: November 26, 2018 at 2:12 pm


James Murrin

November 26, 2018 at 2:12 pm

Hello Tony, Josh & team
I am designing the setup for next year’s beer festival and would like a little help please. We will be selling admission tickets and tickets which will be exchanged for plastic tokens. Last year, I did this by setting up 1 x event and having 3 x datetimelines (for the 3 x sessions) and I assigned 1 x admission ticket and 1 x token ticket to each of the 3 sessions. This worked well, in that we had 1 x ‘Add to Cart’ box on the booking page. (I understand that you get an ‘Add to Cart’ box for each event, and we don’t want more than 1 on a page).

The disadvantage of this method above though, is that you can only have 1 x style of ticket to print (because there is only one ticket template per event, I understand.)

I’ve come across this doc https://eventespresso.com/topic/custom-ticket-add-background-image/ which explains how to customize the ticket output, which is good.

I also read somewhere that I could add custom-fields to the ticket template. Is there anyway I could use a custom field to kick in (print / style) on, say the tokens tickets, but not on the admission tickets, so that I could visually differentiate between them when they’ve being waved at the entrance?

Or, if you have any other idea / way that we could make the tickets look different, that would help so much.

Many thanks.

Dee


Tony

  • Support Staff

November 27, 2018 at 4:51 am

Hi Dee,

The disadvantage of this method above though, is that you can only have 1 x style of ticket to print (because there is only one ticket template per event, I understand.)

Thats correct, message templates (which the ticket is a part of) can only be selected per event, not per ticket within an event.

I also read somewhere that I could add custom-fields to the ticket template. Is there anyway I could use a custom field to kick in (print / style) on, say the tokens tickets, but not on the admission tickets, so that I could visually differentiate between them when they’ve being waved at the entrance?

What would you like to change on the ticket?

To answer your question, yes it’s possible. The way I would probably do it is to add a custom shortcode to the ticket message template that outputs some custom CSS (although it could output whatever you wanted) to maybe change the backgroud colour of the ticket, or add a header to the ticket showing ‘TOKEN TICKET’ etc that only displays on specific tickets (incase the ticket is printed in black and white).

To make it a little more flexible I’d probably use a custom field on the event itself which listed the ID’s of the tickets I wanted the shortcode to show the details for… or you could add a custom field to the ticket itself that the admin could just check when creating the ticket.

How familiar with PHP are you? I have some examples that you can use to work out some of this, other parts you’re going to need to do some digging into the code.


Tony

  • Support Staff

November 27, 2018 at 5:13 am

Actually, if this is just for a single yearly event (or an event that isn’t all that frequent) you could do this with the current shortcodes, specifically [TICKET_ID]

This does depend on what you want to do, but something like this: http://take.ms/fOzzL
(Left is the admission ticket, right is a ‘beer token’ ticket)

Can be done fairly easily without any custom code.

Edit the ticket template and switch to text mode for the main content – http://take.ms/G1iNl

At the top add something like this:

<style>
h1:not(.ticket-id-XXX){
    display:none;
}
</style>

XXX will need to be changed, that’s the ID of your ticket, to find that edit the event and click the <span=”gear-icon dashicons”></span> icon next to the ticket, in the section that opens up you’ll see ‘Ticket ID: XXX’ at the bottom.

Next, back to the ticket template, add something like:

<h1 class="ticket-id-[TICKET_ID]">Testing header</h1>

Into the content, if you look at my screenshot again, you’ll see how I did it – http://take.ms/G1iNl

You can add whatever styles you prefer, add @media print{} should you wish t only change the printed ticket and so on.

The reason I say this works for an infrequent event is the template is now specific to that ticket so you’ll need to change those ID’s for any new event you want this to work on (not you can create custom templates for the ticket notice, then select that custom template on specific events if needed).


James Murrin

November 27, 2018 at 7:04 am

Hi Tony
That’s really helpful. That’s just the sort of thing I’m looking for and I’ll work on that! Many thanks. Dee

The support post ‘Visual difference between tickets for same event’ 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