Overwriting the email templates?
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!
Overwriting the email templates?
Hi,
I'm using TYPO3 v11.5.27 and aimeos v22.10.9, PHP 8.1 on Ubuntu
I'm a bit confused how and where the templates for the emails that get send via the cronjob can be overwritten.
I have spent quite some time now in the aimeos docs, but I think I'm too thickheaded to understand how this is supposed to work
I see that in
there are the templates that I need to modify.
I have a extension in where, aside from the TYPO3 stuff, there is a directory which contains the stuff that a "aimeos" extension (not the aimeos TYPO3 extension) has. Config, Setup, etc and a Template directory.
In that Template directory I can add modifications, for example for the price partial:
This works, and I see the changes in the front end.
Now if I try to overwrite the above mentioned controller-jobs templates
This doesn't work. If I set this template file via the TypoScript settings directly at the cronjob setup, it only works if I give the absolute path there -- like
I think this is a problem then if this template uses partials?
What if I need to modify the partial for the email-oder-Summary only?
It would be cool if someone could shed some light how these overrides are supposed to work. The Aimeos shop is already a config beast, and having it inside another config beast like TYPO3, is, wow. This is way over my head currently, it seems
)
Sorry if this is a n00b question that has been answered already before, I gladly take any RTFM links.
Many thanks,
Tom
I'm using TYPO3 v11.5.27 and aimeos v22.10.9, PHP 8.1 on Ubuntu
I'm a bit confused how and where the templates for the emails that get send via the cronjob can be overwritten.
I have spent quite some time now in the aimeos docs, but I think I'm too thickheaded to understand how this is supposed to work

I see that in
Code: Select all
typo3conf/ext/aimeos/Resources/Private/Libraries/aimeos/ai-controller-jobs/templates/order/email
I have a extension in
Code: Select all
typo3conf/ext/my_shop/
Code: Select all
typo3conf/ext/my_shop/Resources/Private/Extensions/aimeos/
In that Template directory I can add modifications, for example for the price partial:
Code: Select all
typo3conf/ext/my_shop/templates/client/html/common/partials/price.php
Now if I try to overwrite the above mentioned controller-jobs templates
Code: Select all
typo3conf/ext/my_shop/templates/controller/jobs/order/email/html.php
Code: Select all
controller.jobs.order.email.payment.template-html = /var/www/htdocs/typo3conf/ext/my_shop/....../html.php
What if I need to modify the partial for the email-oder-Summary only?
It would be cool if someone could shed some light how these overrides are supposed to work. The Aimeos shop is already a config beast, and having it inside another config beast like TYPO3, is, wow. This is way over my head currently, it seems

Sorry if this is a n00b question that has been answered already before, I gladly take any RTFM links.
Many thanks,
Tom
Re: Overwriting the email templates?
That shouldn't work because the directory is (replace "<ext>" with your extension name):Webrocker wrote: ↑05 Dec 2023, 18:30 I have a extension inwhere, aside from the TYPO3 stuff, there is aCode: Select all
typo3conf/ext/my_shop/
directory which contains the stuff that a "aimeos" extension (not the aimeos TYPO3 extension) has. Config, Setup, etc and a Template directory.Code: Select all
typo3conf/ext/my_shop/Resources/Private/Extensions/aimeos/
In that Template directory I can add modifications, for example for the price partial:This works, and I see the changes in the front end.Code: Select all
typo3conf/ext/my_shop/templates/client/html/common/partials/price.php
Code: Select all
typo3conf/ext/<ext>/Resources/Private/Extensions/<ext>/templates/client/html/common/partials/price.php
This is the correct path for your file:Webrocker wrote: ↑05 Dec 2023, 18:30 Now if I try to overwrite the above mentioned controller-jobs templates
Code: Select all
typo3conf/ext/my_shop/templates/controller/jobs/order/email/html.php
Code: Select all
typo3conf/ext/<ext>/Resources/Private/Extensions/<ext>/templates/controller/jobs/order/email/html.php
By default, the template paths are relative to the ./template/ directories (specified in the typo3conf/ext/<ext>/Resources/Private/Extensions/<ext>/manifest.php file). Absolute paths work too for single files if they are not in the ./template/ directories.Webrocker wrote: ↑05 Dec 2023, 18:30 If I set this template file via the TypoScript settings directly at the cronjob setup, it only works if I give the absolute path there -- likeCode: Select all
controller.jobs.order.email.payment.template-html = /var/www/htdocs/typo3conf/ext/my_shop/....../html.php
Just place the partial in the same sub-directory of the ./templates/ directory in your extension as it is in the Aimeos ai-client-html extension.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Overwriting the email templates?
Hi,
thanks for the fast answer!
typo3conf/ext/my_shop/Resources/Private/Extensions/aimeos/templates/client/html/common/partials/price.php
But interestingly, it does work currently even if the "second" <ext> part is not "my_shop" (my exts name), but "aimeos"
(I tried that thinking, maybe it needs the name of the typo3 extension that it is overwriting, it was "my_shop" initially).
Ok but anyways, thanks for the infos, really appreciated.
I think we overlooked the manifest.php role.
A follow-up question - are the .mjml files compiled to .php automagically, or do I need to compile them if I would need to make fundamental (html) markup changes for the template?
thx,
Tom
thanks for the fast answer!
you're right, but I typed the wrong path in my post. my path isIn that Template directory I can add modifications, for example for the price partial:
typo3conf/ext/my_shop/templates/client/html/common/partials/price.php
This works, and I see the changes in the front end.
That shouldn't work because the directory is (replace "<ext>" with your extension name):
typo3conf/ext/<ext>/Resources/Private/Extensions/<ext>/templates/client/html/common/partials/price.php
typo3conf/ext/my_shop/Resources/Private/Extensions/aimeos/templates/client/html/common/partials/price.php
But interestingly, it does work currently even if the "second" <ext> part is not "my_shop" (my exts name), but "aimeos"
(I tried that thinking, maybe it needs the name of the typo3 extension that it is overwriting, it was "my_shop" initially).
Ok but anyways, thanks for the infos, really appreciated.
I think we overlooked the manifest.php role.
A follow-up question - are the .mjml files compiled to .php automagically, or do I need to compile them if I would need to make fundamental (html) markup changes for the template?
thx,
Tom
Last edited by Webrocker on 06 Dec 2023, 13:10, edited 1 time in total.
Re: Overwriting the email templates?
The name of the second directory is not relevant because all directories in the ./Resources/Private/Extensions/ directory are scanned and included automatically.
They need to be translated manually and we use VSCode for that because there's an extension for MJML files available.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
