Invoice URL on actual invoice PDF

Hi guys,

have successfully implemented the //INVOICE_URL// in the email settings - nice work, thank you. Gave a cheeky try to using {{ invoice_url }} in the PDF template, which didn’t work (I was just chancing my arm with it I admit!), but figured it would be useful to have.

A lot of customers don’t read the actual email, just look at the invoice attached, if we could include that URL in the PDF (either in text or as an image with the link in it) then they’ll see that and can click it. I’m guessing that given the fields available currently and how they get parsed, doing a {{ invoice_url }} may not be too much work?

If you do, I will, of course, love you even more for a lot longer!

Cheers fellas

2 Likes

Thanks Dave. Nice try on the {{ invoice_url }} in the PDF template, but sadly that’s not a field yet.

You’re right that this wouldn’t be too complex to add, so we’ll look to get this added for you. It should be possible to make it a clickable link in the PDF too. (And when this is ready, don’t forget to wrap it in a check for is_invoice - something like the below - so it only shows on invoices and not on credit/delivery notes.)

{% if is_invoice %}
    Pay online at: <a href="{{ invoice_url }}">{{ invoice_url }}</a>
{% endif %}

If anyone else would like to see this, please give this a vote :+1:

1 Like

Awesome work Luke, thank you and with a bonus code snippet too! Man, it’s only just after 9am and my day is made already! Will await the completion of the development, thank you :slight_smile:

1 Like

Good news, Dave :tada:

This variable is now available to add to your custom templates. It will work on both invoices and delivery notes (with the delivery note link being for the associated invoice, of course). It will be blank (or “None”) for credit notes, so make sure to only show it on invoices/delivery notes.

I know in my previous message, I said invoices only, but we have made it possible on delivery notes too :smile:

If you’d like it on both, you can use this snippet:

{% if is_invoice or is_delivery_note %}
    Pay online at: <a href="{{ invoice_url }}">{{ invoice_url }}</a>
{% endif %}

That’s not good news Luke, it’s GREAT news! :smiley:

Awesome work, thank you ever so much, I think I may actually be slightly aroused at this!

Thanks for being fab, good work :slight_smile:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.