Support

Home Forums Custom Files Add-on (EE3) Link to ticket from payment overview page

Link to ticket from payment overview page

Posted: November 15, 2013 at 1:34 pm


Zoe E

November 15, 2013 at 1:34 pm

Hi all, I need to customise the payment overview page. What do I need to add to payment_overview.php to call the ticket page (called using [ticket_link] in the emails) please? I need to allow users to print/download from this page after paying.

I also want to integrate text message receipts – I’ll need to pull the users phone number from a custom registration field – whats the best way to do this from the payment_overview.php page too?

Thank you πŸ™‚


Josh

  • Support Staff

November 15, 2013 at 2:41 pm

Hi Zoe,

For the ticket link you could add this to the template:

<?php echo espresso_ticket_links($registration_id, $attendee_id) ?>

One way to get the customer phone number would be to query the database. The phone numbers are stored in the _events_attendee table. Rather than adding the logic that initiates a text message to the payment overview page template you could add it to a function that gets added to an action hook like the one that fires after a payment is made:

action_hook_espresso_email_after_payment.

More hooks can be found in our documentation:

https://eventespresso.com/wiki/event-espresso-3-1-action-hooks/


Zoe E

November 19, 2013 at 12:53 pm

Lovely, text receipts are working beautifully, I’m triggering a function onclick on the overview page.

Cheers πŸ™‚


Zoe E

November 20, 2013 at 1:01 am

ok, another question on this, if I order multiple tickets for an event, or tickets for different events, I only get a link to one of the tickets. Is it possible to call a link to all the tickets on this page? I’ll also need the registration ID for each ticket so I can pass that in to my text receipt functionality…

Cheers!

Zoe


Dean

November 20, 2013 at 4:10 am

Hi,

What about, if you know the primary attendees registration id, checking for the attendee in the database and getting their session ID.

Then you could check the database for all attendees with that session ID and pull out all their data, and then run a foreach loop with the espresso_ticket_links function and their individual registration ids.

Of course if you can grab the session id at the beginning you could reduce that to a single SQL query rather than two.


Zoe E

November 21, 2013 at 9:39 am

Awesome, thanks for that, I’ve just created a loop (based on the transaction id already used on the payment overview page) that prints out a ticket link and a “text me this ticket” button for each registrant with that transaction id – it’s working a treat πŸ™‚


Dean

November 22, 2013 at 2:26 am

That’s a great way of doing it! I’ll mark this thread as resolved.

The support post ‘Link to ticket from payment overview page’ 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