Invoice Email PDF file name
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Invoice Email PDF file name
Hi,
is there an option to alter the filename of the PDF that gets attached to the order/payment email when the option "pdf = 1" is set ("invoice-123.pdf")?
thanks again,
Tom
is there an option to alter the filename of the PDF that gets attached to the order/payment email when the option "pdf = 1" is set ("invoice-123.pdf")?
thanks again,
Tom
Re: Invoice Email PDF file name
I found this:
https://github.com/aimeos/ai-controller ... 3C2-L303C1
since here the filename is hard coded, it doesn't look like it is supposed to be changed via config
https://github.com/aimeos/ai-controller ... 3C2-L303C1
Code: Select all
protected function filename( \Aimeos\MShop\Order\Item\Iface $order ) : string
{
return $this->context()->translate( 'controller/jobs', 'Invoice' ) . '-' . $order->getInvoiceNumber() . '.pdf';
}
Re: Invoice Email PDF file name
Not via configuration but you can overwrite it in the ext_localconf.php of your own project-specific Aimeos extension like this:
Code: Select all
\Aimeos\Controller\Jobs\Order\Email\Payment\Standard::macro( 'filename', function( \Aimeos\MShop\Order\Item\Iface $order ) {
return 'Bestellung-' . $order->getId() . '_' . $order->getTimeCreated() . '.pdf';
} );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Invoice Email PDF file name
Can confirm this works fine! Thank you.Code: Select all
\Aimeos\Controller\Jobs\Order\Email\Payment\Standard::macro( 'filename', function( \Aimeos\MShop\Order\Item\Iface $order ) { return 'Bestellung-' . $order->getId() . '_' . $order->getTimeCreated() . '.pdf'; } );