Support

Home Forums Event Espresso Premium Events Table View Template show "goes-on-sale" date.

Events Table View Template show "goes-on-sale" date.

Posted: April 18, 2016 at 4:30 am

Viewing 7 reply threads


designplus

April 18, 2016 at 4:30 am

Hi, I want to show in a extra row the ticket “goes-on-sale” date for a event. It´s important that the customers can see, at what date the sale begins an not only a what date the event is. Do you have an idea how this can be done in the template?
Thank you!


Lorenzo Orlando Caum

  • Support Staff

April 18, 2016 at 8:38 am

Hello,

Here is a tutorial on how to set that up:

https://gist.github.com/lorenzocaum/dd5fedd27d0d9ee8716a99610ed30352

And here is a preview of how it will appear:

http://cl.ly/2Q031H2i2F0l


Lorenzo


designplus

April 18, 2016 at 10:02 am

Thanks for the quick reply!
I did exactly what was discribed, but now I get a blank page. What went wrong?
(I checked the script several times).


Tony

  • Support Staff

April 18, 2016 at 10:48 am

Can you add you full template to something like http://pastebin.com/ and post the URL here so we can take a look please?


designplus

April 18, 2016 at 11:17 am

Ok:
http://pastebin.com/nYjeetLs


Tony

  • Support Staff

April 18, 2016 at 11:32 am

Do you have sold out events within the list?

The example above does not account for sold out events and will throw a fatal error if you do, you can fix that by changing this bit of code:

<?php echo $ticket->get_i18n_datetime( 'TKT_start_date', $date_format); ?>

To this:

<?php 
	if ( isset($ticket) && $ticket instanceof EE_Ticket ) {
	echo $ticket->get_i18n_datetime( 'TKT_start_date', $date_format);
	}
?>

Take a look at this – http://take.ms/e382F

Note that Goes on sale will be empty for sold out events.


designplus

April 18, 2016 at 11:53 am

Yes, we had a sold-out event!
Now it works perfectly!

Thank you very much for the quick support!


Tony

  • Support Staff

April 18, 2016 at 1:14 pm

You’re most welcome 🙂

If you have any further problems please let us know.

Viewing 7 reply threads

The support post ‘Events Table View Template show "goes-on-sale" date.’ 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