Posted: June 4, 2016 at 3:24 pm
I am building a custom page for single events, using the templates in the Espresso_Arabica_2014 folder. The page can be found here: http://test.opendialogueapproach.co.uk/?espresso_events=an-introduction-to-the-open-dialogue-approach I am stuck on a few things: 1. Removing the link from venue title and entry title That’s it for now! Thanks Nick |
|
Hi Nick,
Venue title link: in content-espresso_events-venues.php on line 9 it has this: Entry title: has an a href on content-espresso_events-header.php line 11. You remove that html code.
Line 29 of content-espresso_events-venues.php you change:
Maybe. You could try adding some logic or even translate the “Unknown” string to be an empty string.
Yes. You can remove the asterisk there by adding the following to your theme’s functions.php file:
4. Can I include the venue image? Yes, you add this to your template:
You might need to remove the code for the one that’s displaying on the left. I don’t think the Google Maps API will work to display the same map twice on the same page.
The simple way is just don’t use that template part. You can use
Yes you can. This is a good guide that shows how: |
|
Wow, it’s like Christmas came early this year! So many gifts all at once. Thanks very much Josh. There’s one I may need to return though. http://test.opendialogueapproach.co.uk/events/an-introduction-to-the-open-dialogue-approach/ |
|
There’s one other thing I’d like Josh. I would like to add a line above the ticket selector, stating ‘There are currently x of [total_tickets] available’. How would I do this? I have hunted around the forum for the code, without any joy! |
|
One final thing – I hope! – I have created a custom date format, as you can see on the page, using the |
|
Hi Nick, Here is one way to show the remaining spots for an event: https://eventespresso.com/topic/ticketsplaces-remaining-ee4/#post-191823 You could repurpose the espresso_list_of_event_dates function to display in the layout that you are looking for. In this example, its updated to show only the time: https://gist.github.com/lorenzocaum/41f70b94f7c6b212b145 Any changes to the function would replace the default look of the datetimes section on the event pages: — |
|
Hi Lorenzo Both of your suggestions work perfectly for my needs, so thanks. There’s just a couple of things: 1. It’s not clear to me how I get the remaining tickets function to always show the number of tickets left, and not use ‘a lot of’. 2. There was one question above that was missed – Josh suggested I use the_content() in my template to just show the description of my event on a template page, but this is returning the datetime, ticket selector and venue information, as well as the description, as you can see here: http://test.opendialogueapproach.co.uk/events/an-introduction-to-the-open-dialogue-approach/. How do I just return the description? Thanks, Nick |
|
‘A lot of’ should be returned when you do not have a limit set on the tickets. The function checks if there are an infinite amount of tickets available and displays that string.
Which template files are you using? I’m guessing you are not using single-espresso_events.php? EE will inject the details into the the_content() unless you are using that template file, in which case it assumes you are taking over complete control of the output and no longer does so. |
|
Thanks Tony. I only have one ticket type for the event so set the limit there, rather than a global limit. Once I set the global limit the ‘tickets remaining’ function behaved as I was hoping. I am including So, essentially I am looking for a way to return just the description of the event in content-espresso_events.php |
|
$event->description() will output only the description for the event. However, to me there seems to be a misunderstanding of how to set this up (although we need more details to confirm, I may well be wrong) and simply using the above may cause problems further down the line. You have a single-espresso_events.php template file within your child theme correct? You also have multiple templates copied over from Espresso_Arabica_2014 within your child theme? Can you send me a copy of the theme so we can see how you have this set up? You can send the theme to support[at]eventespresso.com (please include a link to this thread so we know what the email is for) |
|
I tried including $event->description() in both single-espresso_events.php and content-espresso_events.php and it broke the page, so it would seem I am doing something wrong. These are the files that I am using in my child theme: I will send you the EE files via email now as requested. |
|
Oops, these are the files: |
|
Hopefully you have received the child theme template files now. Just in case it’s not clear this is where I am wanting the description to appear: |
|
Hi Nick, I loaded your child theme locally with a version of X and only the event description was output within the left div – http://take.ms/9YSUr I then changed Have you customized any other files within Event Espresso? Have you added any filters such as:
To your site to force EE to load all details within the_content()? |
|
Hi Tony, You’re a genius! When I was trying to customise the single event display before I learned about customising templates, I added this to my functions.php file, presumably something I found on this forum:
Once I removed this only the description showed on my page: http://test.opendialogueapproach.co.uk/events/an-introduction-to-the-open-dialogue-approach/ Thanks very much for your help! Nick |
|
You’re most welcome, Nick. I’m glad its now working for you 🙂 To explain a little about those filters for future readers, when you load a single-espresso_events.php or archive-espresso_events.php template, EE assumes you will be taking full control of the output (such as the case here with the custom EE templates). However we found a lot of themes would hardcode specific sidebars or some other elements on the single and archive outputs that many users wanted to remove. You could do this with CSS but it wasn’t very user friendly so we created filters to allow you to use a custom template but continue to use the build in ordering feature of EE. This means you can remove hardcoded elements like sidebars from the output without extensive knowledge of the EE templates (you remove the sidebar from the template and EE did its usual thing with the_content using that ‘custom’ template). However using BOTH the filter and individual custom templates for the EE details results in the problem mentioned above as your telling EE to continue to inject into the_content() and also loading the same details using templates. |
|
Even though the page is now working well (thanks again for all the help) there’s one more question, relating to the remaining tickets script. At the moment it only updates when there’s a completed payment and I’d like it to update for pending payment registrations as well. Is this possible? |
|
Whilst its possible to pull in all registrations with a status of Pending Payment and Approved and then use those values I just want to make sure your aware that it means that anyone who selects a ticket and enters registration details into the form will apply to those values? It may seem obvious but its easily overlooked and it means (depending on your setup) that it may be really easy for any user to force your datetimes to show as sold out even though they aren’t. |
|
Yes, that’s fine Tony. Once people have a ‘payment pending’ status I am happy for them to be removed from the total sales available. We work with organisations who need time to process payments through their systems. I will be keeping an eye on registrations and will be chasing people for the money! How do I change the function? Thanks Nick |
|
You can do something like this: //Use this block inside the datetime loop in place of: //$remain = $datetime->spaces_remaining( true ); $tickets = $datetime->ticket_types_available_for_purchase(); $all_ticket_registrations = 0; if( ! empty($tickets) ) { foreach($tickets as $ticket) { $all_ticket_registrations += $ticket->count_registrations( array( array( 'STS_ID' => array( 'IN', array( EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved ) ) ) ) ); } } $remain = $limit - $all_ticket_registrations; Note the comment at the beginning, that block of code should be use in place of the single line |
|
Thanks Tony. That works well. A couple of further questions: 1. Is it possible to exclude registrations in the trash from the above calculation? |
|
Oh, and also to not count abandoned registrations in the calculation. |
|
To exclude deleted registrations from the list you change:
to
That is not something we can provide support for as it turns out the ticket selector logic would need to be highly customized to work in that way. |
|
It now seems to me that Event Espresso isn’t really the solution for my needs, which is frustrating, given that I have got very used to it, and have done a lot of customisation over the last year or so. It was working fine before when I didn’t have a limit on the number of tickets for an event, but now that I do, it no longer works. My scenario is that I will be regularly running events where there is a limit, but where every registration, both approved and payment pending, needs to count towards the limit, and not only in the function that has now been customised to show the number of tickets left, but also in the dropdown menu where the user selects the number of tickets they want. I need ‘sold out’ to show when the number of approved and payment pending tickets reaches the limit. What happened to me this week is that an event was overbooked, because EE doesn’t work in the way I need it to. I am aware that I can set registrations to ‘approved’ by default, but this means that an incorrect email is sent out to those who haven’t yet paid – I need them to get a different email with a payment link. The reason for needing all of this is that I regularly run events where organisations pay for events via invoice, and the payments may well not come for several weeks, sometimes even after an event, but they always pay in the end – hence my needing to count them as essentially ‘approved’ registrations, but with a payment pending status. If I am wrong and there is a way around this, please let me know. Thanks, Nick |
|
Hi Nick, Could you not include a note within the Registration Approved email stating that if they have paid by Invoice their place is not confirmed until payment is received? Even if you allow the user to pay after the event your are basically Approving every registration anyway with the way you want to set it up. Using a default registration status of Approved and modifying the Registration Approved message template to suit both use cases sounds like it would be a better fit for your event setup rather than modifying EE to use Pending Payment Registration against attendee limits. |
|
Hi Tony. I could indeed do as you suggest for the standard registration email. However, I need a way to send batch messages to those who have yet to pay, reminding them to pay. The way I did this previously was to create a custom ‘Pending Payment’ message, filter registrations by status, and then use the ‘Set Registrations to Pending Payment and notify’ option. I could use a custom ‘Registration Approved’ message instead, but there doesn’t seem to be a way of selecting unpaid ‘Approved’ messages in the registration list. |
|
Hi Nick, If you go to Event Espresso –> Transactions and click on a transaction, then you can send a payment reminder for the transaction. The button will appear in the top right area of the transaction details screen. — |
|
Hi Lorenzo. I sometimes have 100s of reminders to send out, so I need to be able to do this in bulk. |
|
Currently to be able to send bulk emails with the default registration status using Approved you would need to manually select registrations that had ‘Incomplete’ transactions, like this – http://take.ms/BT3UP You can then either set the Bulk Action to ‘Set to Approved and Notify’ to re-trigger the Reg Approved message (which would you can include a remind for Invoice payments) or send a batch email to the selected registrations don the bottom. |
|
Thanks Tony. I think that, for my purposes, I am leaning towards setting the default registration status to ‘Approved’, and including both ticket links and payment reminder links in the Registration Approved emails. If I remember rightly it is not possible to include a payment link in newsletters. If this were possible this would be my preferred method of sending bulk payment reminders. In the absence of this feature I would have to create a custom ‘Registration Approved’ message for payment reminders and use this instead. Am I right in thinking this? If so, would it be possible to include a payment reminder link option for newsletters in a future update? |
|
Yes that is correct. Create a custom Reg Approved message template, set that as the Registration Approved template on the event you are sending the message out for and then re-trigger the reg approved message type.
We are working on adding more shortcodes for the Newsletter message type, 4.9 introduced some changes to how that message type worked and will eventually allow for more shortcodes. |
|
Thanks for confirming Tony. I look forward to learning about the future updates! |
|
The support post ‘Questions about single event page child theme’ 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.