Support

Home Forums Pre-Sales Full order confirmation receipt pdf

Full order confirmation receipt pdf

Posted: May 7, 2016 at 1:42 pm


youngjc345

May 7, 2016 at 1:42 pm

I am testing event espresso to build a mobile app via wordpress. In testing, the “View Order Confirmation Receipt PDF” button displayed after completed registration is not displaying accurately. I would like the link to automatically load the PDF version of the Receipt when clicked, is there any way to have the pdf download made available immediately instead of as an option after?

Thanks!


Tony

  • Support Staff

May 9, 2016 at 7:05 am

Hi there,

Yes it is possible.

You can alter the template used on the thank you page to output a link to directly download the PDF rather then display it.

The template uses the method receipt_url() to generate the link from the current transaction, you can pass the messenger type to that method, for example receipt_url('pdf') will generate a link that when clicked will download the PDF.


youngjc345

May 9, 2016 at 4:56 pm

This is the previous code

<a class="external-media" href="<?php echo $TXN_receipt_url;?>"><span class="ee-icon ee-icon-PDF-file-type"></span><?php echo apply_filters( 'FHEE__thank_you_page_overview_template__order_conf_button_text', __( 'View Full Order Confirmation Receipt', 'event_espresso' )); ?></a>
   </div>

and this is the code after the recommended changes were made

<div class="jst-rght">
    <a class="external-media" href="<?php echo receipt_url('pdf');?>"><span class="ee-icon ee-icon-PDF-file-type"></span><?php echo apply_filters( 'FHEE__thank_you_page_overview_template__order_conf_button_text', __( 'View Full Order Confirmation Receipt', 'event_espresso' )); ?></a>
   </div>

This did not resolve the issue.

Can you advise if this was done correctly?


Josh

  • Support Staff

May 9, 2016 at 8:52 pm

That doesn’t look correct. Something like this instead:

<?php echo $transaction->receipt_url( 'pdf' );?>

The support post ‘Full order confirmation receipt pdf’ 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