Support

Home Forums Event Espresso Premium Can I Display the Wait List names on front end?

Can I Display the Wait List names on front end?

Posted: March 7, 2020 at 6:20 pm


Allen

March 7, 2020 at 6:20 pm

Hi, I use your shortcode to display a list of Event Attendees. I am trying out the Wait List Manager. Is there a short code I can use to display the names of the Waiting List people in a second list (not mixed in with the Attendees)
Thanks!


Josh

  • Support Staff

March 9, 2020 at 9:24 am

Hi Allen,

You could add a shortcode like this:

[ESPRESSO_EVENT_ATTENDEES event_id=1234 status=RWL]
(you’ll change the event ID to match the event’s ID)

or if you use the newer WordPress block editor, this is easier done with the Attendee block:

https://slack-files.com/T02SY781D-FURR1C1LK-f1b6df1ffe


Allen

March 9, 2020 at 4:10 pm

Hi Josh, thanks! I have added the shortcode on this page, but it does not appear to be working … can you check for me? The “Registered Players List” is at bottom of page, and the Wait List is below that. No names are appearing … I know I have 5 signed up … can you analyze from this link?

https://superbilliardsexpo.com/events/2020-diamond-womens-9-ball-pro-players-championship/


Allen

March 9, 2020 at 4:22 pm

Shortcode

Also – I’m not using the new WordPress blocks – I am using Elementor Page Builder


Allen

March 9, 2020 at 4:23 pm

wait


Tony

  • Support Staff

March 10, 2020 at 6:15 am

Based on one of your other threads it looks like you have a custom content-espresso_event_attendees.php file within your theme.

If you temporarily rename that file to something else (anything will do, e.g content-espresso_event_attendees-temp.php) do the waitlist registrations then show?


Allen

March 10, 2020 at 10:56 am

Ok, so, I tried that – and it worked. What does that mean? I’m no expert in PHP (or even skilled for that matter) … at some point in the past I had you guys help me modify that file to show “City, State” of each attendee. Right now, that is more important – so, I changed the name of the file back to normal.

So, two questions:
1. How can I display the Wait List along with my custom tweaks.
2. Can the Wait List be displayed in chronological order rather than alphabetical? I don’t want someone to think they are first on the list because their last name starts with A

Thanks so much! I’ll copy and paste the code in my custom file below


Allen

March 10, 2020 at 10:56 am

<?php
/**
 * Content Template for the [ESPRESSO_EVENT_ATTENDEES] shortcode
 *
 * @package Event Espresso
 * @subpackage templates
 * @since 4.6.29
 * @author Darren Ethier
 *
 * Template Args that are available in this template
 * @type EE_Attendee $contact
 * @type bool       $show_gravatar  whether to show gravatar or not.
 */

if ( $show_gravatar ) {
	$gravatar = get_avatar( $contact->email(),
		(int) apply_filters( 'FHEE__loop-espresso_attendees-shortcode__template__avatar_size', 32 )
		);
} else {
	$gravatar = '';
}

$states = EEM_State::instance()->get_all_states();
$state = isset( $states[ $contact->state_ID() ] ) ? $states[ $contact->state_ID() ]->get( 'STA_name' ) : $contact->state_ID();
$state = ! is_numeric( $state ) ? ', ' . $state : '';
$countries = EEM_Country::instance()->get_all_countries();
$country = isset( $countries[ $contact->country_ID() ] ) ? $countries[ $contact->country_ID() ]->get( 'CNT_name' ) : $contact->country_ID();
$country = ! empty( $country ) ? ', ' . $country : '';

$registrations = array();
if ($contact instanceof EE_Attendee) {
    $registrations = EEM_Registration::instance()->get_all(array(
array(
'STS_ID' => 'RAP',
'ATT_ID' => $contact->ID(),
'EVT_ID' => $event->ID()
),
));
}

foreach($registrations as $registration ){
  if($registration instanceof EE_Registration){
    echo '<li>' . $gravatar . '&nbsp;' .  $contact->full_name() . ' ' 
    . '&ndash; &nbsp;' 
    . '<span style="color:#4D4B4B; font-size:.85em;">'
    . $contact->city()
    . $state
    . '</span>'
    . '</li>';
    
  }
}
    
do_action( 'AHEE__content-espresso_event_attendees__after', $contact, $show_gravatar );


Tony

  • Support Staff

March 10, 2020 at 4:23 pm

Ok, so the code in your template above is looping over the attendees/contacts pulled in by the shortcode and then pulling in only ‘Approved’ registrations for those contacts.

This code 'STS_ID' => 'RAP', explicitly tells Event Espresso to only pull registrations that have a status of RAP (which is short for Registration APproved).

That means the shortcode is pulling in contacts for waitlist registrations, then your code is looping over each of them and pulling Approved registrations to display (which they may, or may not have).

So to answer your questions:

1. How can I display the Wait List along with my custom tweaks.

You are going to need more customizations, not just to how your code is working, but passing over the status from the shrotcode so that your custom code knows what status it should be looking for.

This isn’t something we can provide with a snippet.

2. Can the Wait List be displayed in chronological order rather than alphabetical? I don’t want someone to think they are first on the list because their last name starts with A

Sure, our model system can do this easily enough, however, I’d recommend working on 1 first.


Allen

March 13, 2020 at 4:57 pm

Ok, some of that is beyond my ability. I have disabled my custom files (by adding _temp to each file name) … so, now I should be using your originals, right?

On this page, I only see 999 listed on front-end now, but I see 1014 Approved in my back-end

https://superbilliardsexpo.com/events/open2020/

So why do all approved not show up? I could swear they did last year.

Also, you mentioned that you cannot provide that code in a snippet. can I hire you guys to create the code for me? I really want/need to be able to show ALL Approved Attendees for each event, in a numbered list, alphabetically (like it is now). Then, I want to show the Waiting List, numbered, but displayed in chronological order rather then alphabetical.

And- I want to the list to display City, State again (my custom file does that, but I have it disabled now)


Tony

  • Support Staff

March 16, 2020 at 5:14 am

Hi Allen,

On this page, I only see 999 listed on front-end now, but I see 1014 Approved in my back-end

https://superbilliardsexpo.com/events/open2020/

So why do all approved not show up? I could swear they did last year.

I posted details on this in your other thread:

https://eventespresso.com/topic/attendee-list-not-displaying-all-attendees/

In short, if you have the same attendee adding multiple registrations on an event, the default shortcode will output them once, as they are a single attendee with multiple registrations.

So, to check, do you have multiple registrations from some attendees?

Also, you mentioned that you cannot provide that code in a snippet. can I hire you guys to create the code for me?

We may be able to do this within a support token but it does depend on availability, I can’t confirm right now due to time zone differences but will check on this for you.

To confirm, you want all registrations to show, even if its the same attendee twice?


Allen

March 16, 2020 at 4:26 pm

In short, if you have the same attendee adding multiple registrations on an event, the default shortcode will output them once, as they are a single attendee with multiple registrations.

So, to check, do you have multiple registrations from some attendees?

Sorry, guess I am confused by the wording here. I have created several events – for our Expo, these are “Divisions” of a tournament — Lets say I have Open and Seniors. There are many players who compete in both. There name appears in my list of Registrations twice like “John Smith (1/2)” and “John Smith (2/2)” and I see their name on the front-end, in each Division, as expected.

So, what are you asking? Is the same Attendee (John Smith) enrolled in the event twice? Like, maybe they accidentally paid twice?

We have close to 2000 registrations across 7 events … I do not know an easy way to see if someone accidentally paid twice (usually, if so, they bring to our attention)

****

Basically, when I see 198 “Approved Registration” on the back-end for an event, I want to see all 198 “Approved Registration” on the front-end. I could swear it used to work just fine, maybe I am wrong.

And ideally, I want to show them all, plus city and state.

I also want to display the Wait List, but in chronological order, not alphabetical.


Tony

  • Support Staff

March 17, 2020 at 4:19 pm

Sorry, guess I am confused by the wording here. I have created several events – for our Expo, these are “Divisions” of a tournament — Lets say I have Open and Seniors. There are many players who compete in both. There name appears in my list of Registrations twice like “John Smith (1/2)” and “John Smith (2/2)” and I see their name on the front-end, in each Division, as expected.

With regards to EE, in the above when you say ‘several events’, do you mean separate EE events or tickets within a single event?

With regards to:

“John Smith (1/2)” and “John Smith (2/2)”

If those are within the same EE event, that’s a single attendee with 2 registrations. Think of the Attendee as the person, a person can have multiple registrations but they are still the same person, so…

The default [ESPRESSO_EVENT_ATTENDEES] would display the above attendee once if it’s the same event (say they register onto 2 different tickets on the same event, or a qty of 2 of a single ticket type on an event).

Your custom template does a little more than pull the additional details, it looks over each attendee that EE has pulled in and pulls all of the Approved registrations for that attendee on the current event, that’s why you see ‘all’ of
approved the registrations when using that.

So, what are you asking? Is the same Attendee (John Smith) enrolled in the event twice? Like, maybe they accidentally paid twice?

No, I’m not asking if they paid twice, but if they’ve registered onto multiple tickets on the same event (which may well be expected) then they are still only a single ‘attendee’, which would show once with the default template.

We have close to 2000 registrations across 7 events … I do not know an easy way to see if someone accidentally paid twice (usually, if so, they bring to our attention)

It would be specifically for the event you are setting in the shortcode, meaning the event with the id you are using with event_id

Basically, when I see 198 “Approved Registration” on the back-end for an event, I want to see all 198 “Approved Registration” on the front-end. I could swear it used to work just fine, maybe I am wrong.

And ideally, I want to show them all, plus city and state.

I also want to display the Wait List, but in chronological order, not alphabetical.

For this, you would probably be best simply using your custom template for the ‘normal list’ and then something custom to pull in waitlist registration specifically.

Would that work for you?

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: publish

Updated by  Tony 1 week, 5 days ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!