I started to use email templates - what a fantastic feature!
Most variables just work “out of the box”, but when I try to include a link where customers could download their invoices (_DIRECTDOWNLOAD_URL_INVOICE), it remains blank. I checked settings in the “Invoices” module to see if this feature can be turned on/ off, but I couldn’t find anything.
How could I make sure this variable gets populated with the appropriate link?
There is a hidden conf to allow that : INVOICE_ALLOW_EXTERNAL_DOWNLOAD need to be at 1 in the Setup -> Other Setup
You need to regenerate the Invoice after that to create the link.
Then you will be able to use DIRECTDOWNLOAD_URL_INVOICE (be carefull it is a double __ at the begining and at the end)