Support

Home Forums Event Espresso Premium ESPRESSO_MY_EVENTS not showing all ticket purchases

ESPRESSO_MY_EVENTS not showing all ticket purchases

Posted: May 12, 2021 at 7:39 pm

Viewing 15 reply threads


make_webmaster

May 12, 2021 at 7:39 pm

When an event ticket is purchased using an email that is not logged in, they are not being displayed to that user when we use the shortcode [ESPRESSO_MY_EVENTS]. I can, however see all events purchased by that user when I go to /wp-admin/admin.php?page=espresso_registrations&action=edit_attendee&post=3842&edit_attendee_nonce=e75de3d949. I can send screenshots if you need.

In my test, I have 12 ticket purchases under a specific attendee email. 2 of them were done while logged in as that user. I did check wp_EE_Attendee_ID for the user and it is set to the same attendee ID that is showing the 12 ticket purchases in admin. In admin all 12 are showing, however when using the ESPRESSO_MY_EVENTS, only two show for that user.

Any help you can provide would be greatly appreciated


Tony

  • Support Staff

May 13, 2021 at 3:31 am

Hi there,

Hmm, strange. Can you add some screenshots of this, please?

You can mark your reply private so only EE staff can view them.


make_webmaster

May 13, 2021 at 9:14 am

I don’t see a way in the reply form to add screesnshots?


Tony

  • Support Staff

May 13, 2021 at 9:19 am

You’ll need to host the image and post the link here:

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

Or email them to support[at]eventespresso.com


make_webmaster

May 13, 2021 at 11:40 am

I have emailed you the screenshots


Tony

  • Support Staff

May 13, 2021 at 3:53 pm

Hmm, yeah that’s a strange one.

So that page in the screenshot is using the default [ESPRESSO_MY_EVENTS] shortcode, the output has been altered slightly which I assume is just either CSS, or the Location column removed from the template.

No other modifications at all to that template?

Any code hooking into FHEE__Espresso_My_Events__getTemplateObjects__query_args? For example something like THIS.

On a new temp page (just to save you having to edit that original one), add:

[ESPRESSO_MY_EVENTS template=simple_list_table]

Do all registrations load there?


make_webmaster

May 13, 2021 at 5:30 pm

Hi Tony

I verified and we do not have any code hooking into FHEE__Espresso_My_Events__getTemplateObjects__query_args nor do we pull in the template to override it.

We do have CSS to hide the location column and the legend. I did place [ESPRESSO_MY_EVENTS template=simple_list_table] on another page and only the two events showed up on that page (with the locations column and the legend this time).


Tony

  • Support Staff

May 14, 2021 at 3:05 am

We do have CSS to hide the location column and the legend. I did place [ESPRESSO_MY_EVENTS template=simple_list_table] on another page and only the two events showed up on that page (with the locations column and the legend this time).

Events or registrations?

[ESPRESSO_MY_EVENTS] is the default template, it lists out Events you have registrations on, then lists the registrations within each event.

[ESPRESSO_MY_EVENTS template=simple_list_table] is a registration based list, it lists out each registration in the rows and displays the related data for that registration (event title, ticket name, location).

So you still only see 2 rows on the simple list table?

Where those registrations added as ‘normal’ via Single Page CheckOut (SPCO for short)?

Can you use something like Query Monitor or Debug Bar to view the query and post that here please?

EE uses the ATT_ID to pull registrations linked to that ID as long as the event does not have a status of auto-draft or trash so unless the events have been trashed (they haven’t been, right?) the registrations should display if they are linked to the same contact ID (ATT_ID).

Can you link me to the site so I can take a look at this?


make_webmaster

May 17, 2021 at 4:58 pm

I verified that all of the events have a status of published and the registrations are all approved. The query monitor did not help at all. It would not show me queries in regards to the specific email I am looking for.

These tickets were all purchased using the [ESPRESSO_CHECKOUT] on the checkout page. The only difference was 1 ticket was purchased where the attendee email and the logged in user was the same and the other ticket was purchased where the user was not logged in.

We are still on a development site, I can send you a separate email with information on accessing the site.


Tony

  • Support Staff

May 18, 2021 at 4:17 am

I verified that all of the events have a status of published and the registrations are all approved.

Ok, thank you.

The query monitor did not help at all. It would not show me queries in regards to the specific email I am looking for.

Email? The query doesn’t use email, it uses ATT_ID so if your search for email you won’t find any queries.

To find the query to pull the events, you’d use Query monitor and look in the Queries section.

Under caller select EEM_Base->_process_wpdb_query()

The first query listed there should show WHERE Event_CPT.post_type = 'espresso_events' and AND Registration.ATT_ID = XX (amongst other conditions).

That’s the query used to pull the events, everything else is based on what is returned but that query.

These tickets were all purchased using the [ESPRESSO_CHECKOUT] on the checkout page. The only difference was 1 ticket was purchased where the attendee email and the logged in user was the same and the other ticket was purchased where the user was not logged in.

EE would show a message stating the user needs to log in if it found a user in the system already, I’m assuming you’ve disabled that with a snippet?

We are still on a development site, I can send you a separate email with information on accessing the site.

Sure, I’ll take a look. To send login details you can use this form:

https://eventespresso.com/send-login-details/

Note that we generally require a support token to work directly on a site but I can take a look at the queries and see if anything stands out.


make_webmaster

May 18, 2021 at 11:15 am

This reply has been marked as private.


make_webmaster

May 18, 2021 at 11:33 am

This reply has been marked as private.


make_webmaster

May 18, 2021 at 11:48 am

I think I may have found the issue. We are using different names for the same email and that is creating multiple attendee id’s. I confirmed this by purchasing 3 more tickets using the same email address but different user names. I then checked the db and I can see that 3 more attendee records were created in the db.

Query ran:
SELECT Attendee_CPT.ID AS ‘Attendee_CPT.ID’, Attendee_CPT.post_title AS ‘Attendee_CPT.post_title’, Attendee_CPT.post_content AS ‘Attendee_CPT.post_content’, Attendee_CPT.post_name AS ‘Attendee_CPT.post_name’, Attendee_CPT.post_date AS ‘Attendee_CPT.post_date’, Attendee_CPT.post_excerpt AS ‘Attendee_CPT.post_excerpt’, Attendee_CPT.post_modified AS ‘Attendee_CPT.post_modified’, Attendee_CPT.post_author AS ‘Attendee_CPT.post_author’, Attendee_CPT.post_status AS ‘Attendee_CPT.post_status’, Attendee_CPT.post_password AS ‘Attendee_CPT.post_password’, Attendee_CPT.comment_status AS ‘Attendee_CPT.comment_status’, Attendee_CPT.ping_status AS ‘Attendee_CPT.ping_status’, Attendee_Meta.ATT_fname AS ‘Attendee_Meta.ATT_fname’, Attendee_Meta.ATT_lname AS ‘Attendee_Meta.ATT_lname’, Attendee_Meta.ATT_address AS ‘Attendee_Meta.ATT_address’, Attendee_Meta.ATT_address2 AS ‘Attendee_Meta.ATT_address2’, Attendee_Meta.ATT_city AS ‘Attendee_Meta.ATT_city’, Attendee_Meta.STA_ID AS ‘Attendee_Meta.STA_ID’, Attendee_Meta.CNT_ISO AS ‘Attendee_Meta.CNT_ISO’, Attendee_Meta.ATT_zip AS ‘Attendee_Meta.ATT_zip’, Attendee_Meta.ATT_email AS ‘Attendee_Meta.ATT_email’, Attendee_Meta.ATT_phone AS ‘Attendee_Meta.ATT_phone’, Attendee_CPT.ID AS ‘Attendee_CPT.ID’, Attendee_Meta.ATTM_ID AS ‘Attendee_Meta.ATTM_ID’
FROM wp_posts AS Attendee_CPT
LEFT JOIN wp_esp_attendee_meta AS Attendee_Meta
ON Attendee_CPT.ID = Attendee_Meta.ATT_ID
WHERE Attendee_CPT.post_type = ‘espresso_attendees’
AND Attendee_CPT.post_status NOT IN (‘auto-draft’,’trash’)
AND Attendee_Meta.ATT_email = ‘some email here’

It would appear that the ESPRESSO_MY_EVENTS only return events for one of those attendee ID’s


Tony

  • Support Staff

May 19, 2021 at 4:54 am

I think I may have found the issue. We are using different names for the same email and that is creating multiple attendee id’s. I confirmed this by purchasing 3 more tickets using the same email address but different user names

Yeah, that’s expected, every unique ‘attendee’ in EE will create an EE_Contact.

In your opening post you have this:

I did check wp_EE_Attendee_ID for the user and it is set to the same attendee ID that is showing the 12 ticket purchases in admin.

If the 12 registrations are linked to the same EE_Contact, they should be showing in the My Events section but it sounds like those aren’t assigned to the same contact? I’m not show why they are showing in the admin if they aren’t linked to that contact.

It would appear that the ESPRESSO_MY_EVENTS only return events for one of those attendee ID’s

That’s correct. The My Events section shows registrations linked to the EE_Contact (the wp_EE_Attendee_ID value) that is linked to the current WP_User.


make_webmaster

May 19, 2021 at 9:06 am

How can I see all tickets purchased by a particular email? We have users who may purchase multiple tickets for say their family. They will give us one email for all attendees but different names for each member of their family. I need the user to be able to see all tickets they bought regardless of the name used.


Tony

  • Support Staff

May 19, 2021 at 9:37 am

That’s not something we have available, the My Events add-on will show registrations linked to the EE_Contact pulled from the WP_User.

However, if you want to pull the registrations yourself, you can do so using something like:

$registrations = EEM_Registration::instance()->get_all(
    array(
        array(
            'Attendee.ATT_email' => 'example@email.com'
        )
    )
);

Just switch out the value to be the current user’s email.

Viewing 15 reply threads

The support post ‘ESPRESSO_MY_EVENTS not showing all ticket purchases’ 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