Support

Home Forums Event Espresso Premium Problem with custom event template

Problem with custom event template

Posted: February 26, 2015 at 4:46 am

Viewing 21 reply threads


adasch

February 26, 2015 at 4:46 am

Hi there,
I’d like to customize the single event template so I copied the files to my child theme es mentioned here:
https://eventespresso.com/wiki/build-custom-espresso-event-post-templates-genesis/

There is a line
<?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?>
which displays the tickets, price, quantity and adds a “buy” botton.

I want to get rid of eveything except the buy botton. And the quantity file should alwasy set to 1, so there is no need to change that.

I couldn’t make my way through all functions etc so I’m asking you guys for some help. Where can I change that?

Thanks
adasch


Lorenzo Orlando Caum

  • Support Staff

February 26, 2015 at 12:37 pm

Hi, the actual ticket selector can’t be removed as that would prevent selecting of an actual ticket or pricing option.

Could you clarify on what you are trying to remove?


Lorenzo


adasch

February 27, 2015 at 2:58 am

This is how my event list looks right now:
https://dl.dropboxusercontent.com/u/2710759/events1.png

I’d like to make it like this:
https://dl.dropboxusercontent.com/u/2710759/events2.png

– So I don’t need the whole table on the top.
– (Quantity should always set to 1)
– And I want to re-arrange the look of the date times

I was search for EVT_display_ticket_selector, espresso_events-tickets, espresso_get_template_part and so on but could not get through it yet πŸ™‚

Any advice would be appreciated. Also any changes should be update-safe, so I hope I can put all neccessary files in my child theme folder.

adasch


adasch

February 27, 2015 at 3:36 am

I managed to get rid of the table (or hide it) with CSS

.tkt-slctr-tbl-wrap-dv{ display:none }

Not ideal but good for now.

So now I want to modify the event daytimes display. I found the file template_tags.php. But when I copy this file to my child theme and make some changes, nothing happens. When I do the same changes in the main plugin folder it does, but it’s not update safe. How do I manage that?


adasch

February 27, 2015 at 3:37 am

Oh and how do I set the ticket quantity always to 1?


Dean

February 27, 2015 at 3:55 am

Hi,

template_tags.php is not a template file so copying it won’t do anything. You would need to call the functions accordingly and use any relevant action hooks or filters.

For example FHEE__EE_Ticket_Selector__display_ticket_selector__template_path (filter found in /wp-content/plugins/event-espresso-core-reg/modules/ticket_selector/EED_Ticket_Selector.module.php ) could be used to change the template file (/wp-content/plugins/event-espresso-core-reg/modules/ticket_selector/templates/ticket_selector_chart.template.php) to something different.

Here are some ways to set the ticket value to 1: https://eventespresso.com/wiki/setup-default-value-1-ticket-selector/


adasch

February 27, 2015 at 9:29 am

Hi Dean and thank you. I got the ticket value set to 1. Thanks.

I also added a new function “function espresso_list_of_event_dates” in my child themes function.php whre I rearranged the studd I needed. This works well, too.

One last thing. I want to show the venue even in the events list. I duplicated content-espresso_events.php and found the lines, where the event list is put together (tickets, datetimes, details).

There is a quere if ( is_single() ) elseif ( is_archive() ).
In both cases, there is a line <?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?> and I thought this must add the venue. But as I said, this line is in both cases but the venue is only displayed in a single event view (not in the events list).

Sorry for my bad english – I hope you understand me πŸ™‚

thanks!


Lorenzo Orlando Caum

  • Support Staff

February 27, 2015 at 9:54 am

Hi, thanks for explaining further and we do understand you.

There is a template setting that is available in the WP dashboard. It will allow you to show the venue in the event listing page (example.com/events/).

Go to WP-admin –> Event Espresso –> General Settings –> Templates. Then look for the display venue details setting:

http://cl.ly/image/3j2K1E3h2C03

Set it to yes and save changes.


Lorenzo


adasch

February 27, 2015 at 11:59 am

Perfect. Thank you.

Another weird thing I just noticed:
When an event is sold out (and this fact is displayed in the ticket selector) there is still a “register now” button. But when I click on it it says something like “error. please select a ticket quantity”. Well, that’s still in the events list – in the single event you cant push that button.

How can I replace the “register” button in the event list with an “sold out” label?
I do know that I can display a “status banner” but the “register” button is still there – which makes no sense.


Lorenzo Orlando Caum

  • Support Staff

February 27, 2015 at 4:52 pm

Hi, I ran some testing on this by manually setting the ticket / pricing options to match the quantity sold. This set the event status to sold out, updated the ticket selector and removed the register button for this event.

http://cl.ly/image/3I443w170z11

Other events in the list were no affected.

Can you confirm that you are referring to the event listing page (example.com/events/)?


Lorenzo


adasch

March 3, 2015 at 4:31 am

Hi Lorenzo,
if a event is sold out it seems the “register” button correctly does not appear on the event listing page but it does appear on a regular page using the shortcode [ESPRESSO_EVENTS].

Can you confirm that?


adasch

March 3, 2015 at 5:19 am

It gets even weirder:
[ESPRESSO_EVENTS] shows a register botton of sold out events
[ESPRESSO_EVENTS category_slug=”kombi”] does not.


Lorenzo Orlando Caum

  • Support Staff

March 3, 2015 at 2:45 pm

Hi, I was able to verify the issue when a shortcode is used. My earlier test was from the default events listing page and I did not see it there.

I’ve created a bug report with your findings and my feedback and shared it with the development team.

I’ll update this support post once I have more information.

Thanks


Lorenzo


adasch

March 6, 2015 at 2:43 am

Hi Lorenzo,
anything heard from the dev team yet? This topic is kind of urgent to me. Can you tell me where (in which file / which function) the register botton is displayed? If an event is sold out i do not want to just display nathing but a specific “sold out” button.

I have still no clue where to look for that :-/

thanks


Lorenzo Orlando Caum

  • Support Staff

March 6, 2015 at 5:21 am

Hi, this has not been reviewed yet.

The ticket selector runs via the ticket_selector_chart.template.php file.


Lorenzo


adasch

March 9, 2015 at 4:24 am

Hi, in the frontend it looks like this:

<div class="tkt-slctr-tbl-wrap-dv" id="tkt-slctr-tbl-wrap-dv-425">
...
</div>
<input type="submit" value="Register now β€Ί" class="ticket-selector-submit-btn" id="ticket-selector-submit-425-btn">

I do not want to make any changes within the ticket selector, as I set it to “hidden” anyway. I’d like to replace the “Register now” button with a “sold out” label. I guess ticket_selector_chart.template.php is not the right place to look for that, is it?

Thanks!


Lorenzo Orlando Caum

  • Support Staff

March 10, 2015 at 4:05 pm

Hi! I have a workaround that may work.

Go to this location using your preferred SFTP or FTP client:

/wp-content/plugins/event-espresso-core-reg/modules/ticket_selector/

Open the EED_Ticket_Selector.module.php and then go to about line 237 and try commenting that out:

http://cl.ly/image/1G0t0h2C0X1P

When I tested that, pages with the ESPRESSO_EVENTS shortcode and the default events listing page (/events/) both showed the View details button instead of the register button along with the ticket selector.

Clicking that button then brought you to the single event page.


Lorenzo


adasch

March 13, 2015 at 7:37 am

Thanks, but this is not what I am looking for. I do not want my visitors to go to the single event page. They should be able to register right away.

I guess somewhere in the code must be an if statement like

if not sold out
show register button
else
show nothing

I haven’t found it yet πŸ™


adasch

March 13, 2015 at 9:08 am

Okay, I kind of got it now. I commented out the line you told me. Furthermore, I changed line 245 to this:

return ! is_single() ? 'Sold out' : '';

So insted of a “Details” Button there is just plain text “sold out”.

This is what I wanted but not HOW I wanted it πŸ™‚ because this is not update safe, is it. It’s okay for now but I still would appreciate it, if this bug is fixed.

Thanks


Lorenzo Orlando Caum

  • Support Staff

March 13, 2015 at 10:03 am

Hi, I may be misunderstanding you but that is how it worked before the bug changed the behavior.

Here are some examples:

If an event has available tickets, then an attendee can register from a page using the ESPRESSO_EVENTS shortcode. They can also click through to the single event page by clicking on the event title.

If an event does not have available tickets, the Register button is changed to View Details. That View Details button will then take a registrant/attendee to the single checkout page.

And here is another option to consider:

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

The sample code above will remove expired events from a page using the ESPRESSO_EVENTS shortcode.

Hope that clears up any confusion.

Thanks


Lorenzo


Josh

  • Support Staff

April 21, 2015 at 1:47 pm

Hi adasch,

A little update on this: The latest release of Event Espresso 4.6 includes a change so if all the tickets in an event are sold out, the register now button is dynamically removed. The changelog can be found here:

https://eventespresso.com/wiki/ee4-changelog/#4.6.21


Lorenzo Orlando Caum

  • Support Staff

May 22, 2015 at 2:34 pm

Hello again,

In April, you asked a question about adjusting the display of some content in Event Espresso via the template settings page in the WordPress dashboard. I replied with some steps on how to make that change.

Those steps have now changed since we have relocated some of those screens.

The templates settings page that was previously located in Event Espresso –> General Settings –> Templates is now located in the following area of the WP dashboard:

WP-admin –> Event Espresso –> Events –> Templates

We have also relocated the Google Maps tab to this location:

WP-admin –> Event Espresso –> Venues –> Google Maps

You can also see other changes for this version of Event Espresso 4 here:

https://eventespresso.com/wiki/ee4-changelog/#4.6.28

Thanks!


Lorenzo

Viewing 21 reply threads

The support post ‘Problem with custom event template’ 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