Support

Home Forums Event Espresso Premium Can I combine the event tickets table and the event dates list?

Can I combine the event tickets table and the event dates list?

Posted: June 4, 2015 at 4:05 pm

Viewing 10 reply threads


scaldwell

June 4, 2015 at 4:05 pm

Our pages would look so much better if the Event Tickets table contained the Event Times/Dates instead of having separate sections, which pushes the actual class description way down the page… (http://portlandfashioninstitute.com/events/learn-to-sew/)

Right now, the Tickets table offers a Show Details option – couldn’t it display the time and date there, with a Show More Details link? I don’t really even want the Datetimes to show unless there are tickets available. Would I be able to create a special template where I merged the two? And if so, what do I need to be aware of – ?

Thank you!


Josh

  • Support Staff

June 4, 2015 at 6:29 pm

Hi there,

You can make a custom template and add a column for displaying the datetimes for each ticket.

A few tips on how to make this work:

1) You copy the ticket_selector_chart.template.php file from the Event Espresso plugin into your WP child theme.

2) You add a function to your child theme’s functions.php file that will tell EE to “switch” the location for the template. Here’s that function:

add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', 'my_custom_ticket_selector_template_location');

function my_custom_ticket_selector_template_location(){
    return get_stylesheet_directory() . '/ticket_selector_chart.template.php';
}

3) The code in the ticket selector template already pulls in the dates for the “Event Access” section, so you can re-use some of that code that’s already there.

4) Please keep in mind that any upcoming changes to the ticket_selector_chart.template.php file will need to be merged into your customized version. (for example, when we add new features, your custom template will need to be updated in order to use the new feature)

5) Once you have the dates displaying in the ticket selector table, you can go to Event Espresso > Events > Template Settings and set the option for display datetimes to No.


scaldwell

June 5, 2015 at 11:42 am

Thanks Josh! Super excited!!!! Thank you!!!


Josh

  • Support Staff

June 5, 2015 at 4:12 pm

You’re welcome!


scaldwell

June 9, 2015 at 5:34 pm

Josh,
I got in there and started playing around – as I don’t know exactly what I’m doing. I though maybe I just need to turn that Show Details toggle on, so that it shows by default, and then I can go in and delete all the data except for the dates & times but that would mean that the first class listed would actually have four start times (because it’s a combination of the three classes) and that would be really messy – I would rather have the dates & times show like they do on the Datetimes – nice and clean.

I don’t really know how I can connect them however. Can you give me a little more guidance please? Thank you so much!!

And I’m not opposed to hiring someone who’s really good at EE to help me – where would I find a programmer to assist?

Thanks again!
Shelly


scaldwell

June 9, 2015 at 5:34 pm

Scratch that last question, I found this (https://eventespresso.com/developers/event-espresso-pros/)


Lorenzo Orlando Caum

  • Support Staff

June 10, 2015 at 11:04 am

Hi Shelly, I think your idea could work with some custom coding but how would it work if a ticket had access to multiple dates?

If I understand you correctly, that would should multiple dates in that area.


Lorenzo


scaldwell

June 10, 2015 at 11:33 am

The data shows the way I’d like it from the eventdates table that sits below the ticket table.. if you look at the page: http://portlandfashioninstitute.com/events/learn-to-sew/

You will see that the first option’s dates are
LTS Series = July 13, 2015 – July 30, 2015

this represents the date of the first class and the ending of the last class. THis is the data I want to sit where it says Show Details (in the ticket table)

Does that make sense?
Shelly


Josh

  • Support Staff

June 10, 2015 at 4:31 pm

Hi Shelly,

It does make sense. I can also offer a few other ideas that would be much simpler to implement and maintain over time because they will not involve refactoring the ticket selector template.

Idea 1: You can add some CSS which will float the date time list into two columns. Here’s some ready-made CSS that will make this happen:

.ee-event-datetimes-ul li {
	float: left;
	width: 50%;
}

.ee-event-datetimes-ul:before,
.ee-event-datetimes-ul:after {
	content: '';
	display: table;
}

.ee-event-datetimes-ul:after {
	clear: both;
}

Idea 2: You can also move the class description so it appears above the ticket selector table. This can be done either by adding and modifying templates to your theme, or via a function file. Here’s example code that shows how to move the ticket selector with a function:

https://gist.github.com/joshfeck/1151c89082ccb5c0b478


scaldwell

June 11, 2015 at 9:04 am

Thank you Josh –
The css did change the layout of the event times, they are now in two columns, however my goal was to get the event times data to replace the Show Details toggle in the Ticket selector table.

The function.php addition did move the ticket table below the class description tho, thank you.

Any way to merge that table data?


Josh

  • Support Staff

June 11, 2015 at 9:37 am

Yes, it can be done by refactoring the ticket selector template by changing the table markup.

Viewing 10 reply threads

The support post ‘Can I combine the event tickets table and the event dates list?’ 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