Support

Home Forums Event Espresso Premium Allow users to see and print their tickets from website

Allow users to see and print their tickets from website

Posted: April 22, 2019 at 1:13 pm

Viewing 18 reply threads


ICLE

April 22, 2019 at 1:13 pm

I see that users get an email which has a link to their ticket. How do I add a column and place this link in the registration list that is placed on the user profile? I would also like to link back to the original event record as well by the name of the event which already has a column.


Tony

  • Support Staff

April 23, 2019 at 6:49 am

Hi there,

How do I add a column and place this link in the registration list that is placed on the user profile?

The table on the user profile can be modified, but to do so you need to load your own custom version of the table.

Are you not using the [ESPRESSO_MY_EVENTS] shortcode to output a ‘My Events’ section on the front end for the user? The ticketing add-on automatically adds a link to the ticket on that output.

If you specifically want the ticket within the table shown on the profile page, you’ll need to copy the template to your theme’s root directly (preferably a child theme) and then modify the template there.

So copy \eea-user-intergration\templates\eea-wp-users-registrations-table.template.php to root of the theme.

Add an additional column to the table, and then you’ll need some code similar the code on lines 14 through 33 here:

https://gist.github.com/Pebblo/e56f98451d1aa0964717

To generate the ticket link for the registration.

I would also like to link back to the original event record as well by the name of the event which already has a column.

My apologies, but I’m not sure what this means.

What is the ‘original event record’? The event on the front end?


ICLE

April 23, 2019 at 12:53 pm

Yes, the front end event even it it is no longer active. Just as reference.
You have been awesome! This is the best support I can think of for the Enterprise price!


ICLE

April 23, 2019 at 12:54 pm

This reply has been marked as private.


Tony

  • Support Staff

April 24, 2019 at 3:45 am

On lines 35 – 38 you’ll see the code used to output the link.

It checks if the current use can edit the event and if so, outputs the edit event link, if not it outputs the event name. It’s using a ternary if which is essentially condition ? true : false which in this case looks like:

'can user edit the event' ? {output_edit_event_link} : {output_event_name}

So you want to switch out the {output_event_name} code, which is this section: https://monosnap.com/file/6x9gsHkqvHGwBiC08MypVW0uhpMBxm

You can switch that for something like:

'<a href="'. $registration->event()->get_permalink() .'" title="'. esc_attr__('View Event', 'event_espresso') .'">' . $registration->event_name() . '</a>'

You have been awesome! This is the best support I can think of for the Enterprise price!

Thank you for the feedback 🙂

If have a minute we would really appreciate if you could share your experience with Event Espresso or provide a review on WP.org.

With regards to your other question, I’m not aware of any but I’ll check with the rest of the team.


ICLE

April 24, 2019 at 6:29 am

The output of [ESPRESSO_MY_EVENTS]is almost perfect, however I would like to not-show one of the fields in the gear dropdown. Is there a way to edit [ESPRESSO_MY_EVENTS]or duplicate|rename and edit?


Tony

  • Support Staff

April 24, 2019 at 6:59 am

Which field do you want to remove?

Some of the content is filtered and so you can remove it with a snippet, others you’ll need to copy the template.


ICLE

April 24, 2019 at 10:51 am

Everything from the ‘content edit window’ that comes over. The name, venue, dates and times are fine (although I would like to reformat the date time to something more concise).


ICLE

April 24, 2019 at 10:52 am

This reply has been marked as private.


Tony

  • Support Staff

April 24, 2019 at 2:27 pm

Everything from the ‘content edit window’ that comes over. The name, venue, dates and times are fine (although I would like to reformat the date time to something more concise).

Sorry but that’s a little to vague for me to give an example on 🙂

I can tell you that it sounds like for the info you want to remove you’ll want to edit the templates.

You can copy the template files from the plugins \templates\ directory into your themes root directory to override the default templates. If you search the templates to find the section you want to remove, copy that template to your theme’s root and edit it there.

If you let me know the specific sections you want to remove, I can give you more specific details if needed.

With regards to your other question, I checked and unfortunately, we don’t have any on file that I can share.


ICLE

April 25, 2019 at 7:19 am

Regarding [ESPRESSO_MY_EVENTS]
I have indicated the “field” I would remove in users’ class list “dropdown”.
Course List Dropdown example screengrab


Tony

  • Support Staff

April 25, 2019 at 9:38 am

Ahh, ok, I see.

The whole section from the event name to the ‘Your tickets’ heading is your event content so without adding your own classes into the content to then hide using CSS, you’ll lose that whole section including the address and image.

So do you still want to remove that?

If so you copy \eea-user-intergration\templates\content-espresso_my_events-event_section.template.php

To you child theme and remove linee 55. which should be:

<?php echo apply_filters('the_content', $event->description()); ?>


ICLE

May 6, 2019 at 7:24 am

I am using /public_html/wp-content/plugins/eea-wp-user-integration
and that edit produces the following:
Table with nothing in it.
I do not seem to have an \eea-user-integration\ directory.


ICLE

May 6, 2019 at 7:27 am

https://monosnap.com/file/6SrzJaCntGtwKYKOWVhPVtJlpPgmhp
That is the table before codechange.

Here is the table after:
https://monosnap.com/file/NbcnGehXznqso65lG27wPrKT2TaNK0


Josh

  • Support Staff

May 6, 2019 at 11:16 am

Hi,

May I ask do you now have a template file in your theme that’s name is “content-espresso_my_events-event_section.template.php” and if so, can you share a link to a gist or wpbin or its contents?


ICLE

May 7, 2019 at 10:55 am

This reply has been marked as private.


Tony

  • Support Staff

May 8, 2019 at 3:58 am

Looks like your’ve removed more than just the code I mentioned above – https://monosnap.com/file/7NNm5Xj5GfpntssyvhZCUb8dsLNAA1

The output in the second screenshot is because you’re getting a fatal error as the syntax is incorrect, it breaks the loops as it removes the section that starts the venues loop.

If you revert the code back to the default template (copy the original template to your themes root directory again), then remove only:

<?php echo apply_filters('the_content', $event->description()); ?>

It will remove just the event description from the output and you can then work on your ACF fields.


ICLE

May 8, 2019 at 6:29 am

Thank You.


ICLE

May 8, 2019 at 6:48 am

Finally got it to work. Thanks.
https://monosnap.com/file/Bvq6XCNDIuhq9wnAmfH6SQMJNVGowr

Opening a new ticket to display the acf in the dropdown. This ticket is off topic.

Viewing 18 reply threads

The support post ‘Allow users to see and print their tickets from website’ 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