Support

Home Forums WP User Integration Add an invoice link to the "my events" page.

Add an invoice link to the "my events" page.

Posted: January 16, 2013 at 7:34 am

Viewing 8 reply threads


Doug Hoseck

January 16, 2013 at 7:34 am

I have the my events page looking awesome in my template but there is not link to download the invoice. How would I add a link for users to be able to download their invoice for each event booking, from the “my events” user page?

Thanks


Jonathan Wilson

January 16, 2013 at 12:16 pm

Hi Doug,

Great idea. I am creating a ticket for one of our developers to include this in an update.

You will need to add this code to either in the event_espresso_my_events() function in the my_events_page.php (in the members add-on), which is a core file that will be overwritten during an update; or the function needs to be copied into the custom_functions.php that comes with the custom files add-on. Also, you may need to create an additional column in the html table.

<a href="<?php echo home_url(); ? rel="nofollow">/?download_invoice=true&amp;admin=true&amp;registration_id=<?php echo $registration_id ?>" target="_blank"  title="<?php _e('Download Invoice', 'event_espresso'); ?>"><img src="<?php echo EVENT_ESPRESSO_PLUGINFULLURL ?>images/icons/page_white_acrobat.png" width="16" height="16" alt="<?php _e('Download Invoice', 'event_espresso'); ?>" /></a>

If you are not familiar with PHP, it might be best to have us do it for them using a support token.


Doug Hoseck

January 17, 2013 at 1:16 am

Not to seem ungrateful or anything but this is not the kind of comprehensive support I would expect from a commercial plugin that costs as much as event espresso.

I know enough about PHP to know that what you have given me is not comprehensive instructions. And I am damned if I am going to spend another $65 on a support token. Especially considering the fact that this function should already be included in a comprehensive (commercial) booking system.

I managed to create another colum which will display $invoice_link. What I cannot work out is how to build that link. Please could you give me the function code correctly in this format:
$invoice_link = ……;

Please replace the “…….” part with the code I need to build the invoice link.


Seth Shoultes

  • Support Staff

January 19, 2013 at 9:46 am

HI Doug, Very sorry to hear we dropped the ball on regarding your support request. It’s my fault that you didn’t get a detailed response. Jonathan mainly helps out in the sales department and is very new to PHP and Event Espresso. He was just going by the quick response I gave him via our internal chat channel. Please copy and paste the following code into the my_events_page.php (in the members add-on). I have added this same code to an upcoming version of the members addon (version 1.9.8, because version 1.9.7 is already in beta testing). Let us know if you need anything else. This is the complete file contents, so you can just copy and paste this into the my_events_page.php: https://gist.github.com/4587408


Doug Hoseck

January 21, 2013 at 12:21 am

Hi Seth,

I tried this and it crashed my site. Reverted to original file & it’s working again. Please could you double check this code.

Thanks


Doug Hoseck

January 21, 2013 at 12:23 am

Maybe it is just something odd happening with the copy/paste process.

Please just give the bits of code to add.


Seth Shoultes

  • Support Staff

January 21, 2013 at 9:59 am

Hi Doug,

There were quite a few changes that were made to make this work properly. Maybe some of the code was removed from my code above. Here is a Gist of the code:

https://gist.github.com/4587408


Seth Shoultes

  • Support Staff

January 21, 2013 at 10:01 am

Or, if you want, you can email me the credentials I asked for via LinkedIn.


Doug Hoseck

January 21, 2013 at 3:18 pm

Hi Seth,

Thanks buddy, that did the trick. You have restored my faith in Event Espresso (& I dare say, improved it:)

Doug

Viewing 8 reply threads

The support post ‘Add an invoice link to the "my events" 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