Support

Home Forums Event Espresso Premium Thank you page add invoice button

Thank you page add invoice button

Posted: September 16, 2016 at 3:36 am

Viewing 5 reply threads


Talmor

September 16, 2016 at 3:36 am

Hello,
Is it possible to add the invoice button next to the order button on the Thank You page?
Greetings.


Josh

  • Support Staff

September 16, 2016 at 8:29 am

Do you mean move the “View Invoice” link up into the box so it’s next to the “View Full Order Confirmation Receipt” button? I want to make sure I understand exactly what you’re wanting to move and where before I look into this any further.


Talmor

September 21, 2016 at 8:05 am

Sorry for the late response. Yes a extra button in the box wich will linked to the invoice.
See http://www.talmor.nl/wp-content/uploads/2016/09/talmor-invoicebutton.jpg
The red button is photoshopped.
Thank you!


Tony

  • Support Staff

September 22, 2016 at 5:47 am

Hi there,

It is possible to do this, but you will need to add the invoice button to the template yourself. The template used for that display is:

\shortcodes\espresso_thank_you\templates\thank-you-page-overview.template.php

Grab a copy of that template and place it within your themes root directory, then edit the file there.

To generate the Invoice url you can use:

$TXN_invoice_url = $transaction->invoice_url( 'html');

Then you just want to check that you actually have a url before outputting it to the page:

if( ! empty( $TXN_invoice_url) ) :

Then within that statement output the button:

<a class="ee-button ee-roundish indented-text big-text" href="<?php echo $TXN_invoice_url;?>"><span class="ee-icon ee-icon-PDF-file-type"></span><?php _e('View Invoice', 'event_espresso' ); ?></a>

You’ll end up with something like this:

https://gist.github.com/Pebblo/8cac847b47569479e33307699dcfcdd7


Talmor

September 26, 2016 at 4:08 am

Wow thank you very much for the complete code of this. ๐Ÿ™‚ It works like a charm!
Greetings


Tony

  • Support Staff

September 26, 2016 at 4:13 am

You’re most welcome ๐Ÿ™‚

Viewing 5 reply threads

The support post ‘Thank you page add invoice button’ 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