Order ID in email subject instead of invoice no
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!
Order ID in email subject instead of invoice no
Hi,
after the upgrade to 2024 the order email has the invoice no set in the email subject.
For easier handling we still need the order id instead.
How or where can that be set.
Aimeos: 24.10.2
TYPO3: 12.4.23
after the upgrade to 2024 the order email has the invoice no set in the email subject.
For easier handling we still need the order id instead.
How or where can that be set.
Aimeos: 24.10.2
TYPO3: 12.4.23
- Attachments
-
- image002.png (62.56 KiB) Viewed 20918 times
-
- image001.png (159.47 KiB) Viewed 20918 times
Re: Order ID in email subject instead of invoice no
The easiest way is to set the value of the invoiceno column in the mshop_locale_site table to the latest order ID. Then, both are the same. For old orders, you can also set the mshop_order.invoiceno field to the same value as the order ID.
Alternatively, you can add a macro for "invoicenumber" in your own extension:
See also: https://github.com/aimeos/aimeos-core/b ... hp#L49-L51
Alternatively, you can add a macro for "invoicenumber" in your own extension:
Code: Select all
\Aimeos\MShop\Order\Item\Standard::macro('invoicenumber', function($order) {
return $order->getId();
});
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Order ID in email subject instead of invoice no
That's simple indeed!
Thanks.
Thanks.
Re: Order ID in email subject instead of invoice no
Unfortunately, the simple solution doesn't work for the future but only for the current (or past) order.
If a user breaks up during the checkout, only the order number is incremented but not the invoice number. That's why we now have the same problem again.
How can I implement your suggestion in my extension? I checked https://aimeos.org/docs/2024.x/typo3/extend/ but for me it's not clear how to extend that very method (Aimeos\MShop\Order\Item\Standard::getInvoiceNumber()).
If a user breaks up during the checkout, only the order number is incremented but not the invoice number. That's why we now have the same problem again.
How can I implement your suggestion in my extension? I checked https://aimeos.org/docs/2024.x/typo3/extend/ but for me it's not clear how to extend that very method (Aimeos\MShop\Order\Item\Standard::getInvoiceNumber()).
Re: Order ID in email subject instead of invoice no
You can add it to the ext_localconf.php if your project specific Aimeos extension.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Order ID in email subject instead of invoice no
Ah, ok, thanks.
Re: Order ID in email subject instead of invoice no
A little bit late...
The call of the method throws an error:
So, unfortunately, it is not working.
The call of the method throws an error:
Code: Select all
Too few arguments to function Aimeos\MShop\Order\Item\Base::{closure}(), 0 passed and exactly 1 expected
Re: Order ID in email subject instead of invoice no
Sorry, the correct code is:
Code: Select all
\Aimeos\MShop\Order\Item\Standard::macro('invoicenumber', function() {
return $this->getId();
});
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
