Adapt EMails in Typo3 with AimeosExtension
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 11
- Joined: 21 Dec 2016, 10:22
Adapt EMails in Typo3 with AimeosExtension
Hi,
I try to adapt some delivery and payment Emails with my created Aimeos Extension. I can overwrite with this extension everything, but not the Email-Templates. So I read in this Forum, that you have to add TypoScript in the Scheduler Task. So i added this line:
My Problem is, that this Template is now used for every payment-status. But I only want to change the Email for payment-status 6. How can I do this with my Extension. Or do i have to edit the original Aimeos Email-Templates?
Thanks for Help
I try to adapt some delivery and payment Emails with my created Aimeos Extension. I can overwrite with this extension everything, but not the Email-Templates. So I read in this Forum, that you have to add TypoScript in the Scheduler Task. So i added this line:
Code: Select all
plugin.tx_aimeos.settings.client.html.email.payment.html.standard.template-body {
0 = /www/htdocs/w010525e/update.schwabenpark.de/typo3conf/ext/schwabenpark_shop/Resources/Private/Extensions/schwabenpark_shop/client/html/templates/email/payment/6/html-intro-body-default.php
}
Thanks for Help
-
- Posts: 11
- Joined: 21 Dec 2016, 10:22
Re: Adapt EMails in Typo3 with AimeosExtension
btw.: I am using Typo3 7.6.14, Aimeos 16.10.2 and PHP 7.0.10 CGI
Re: Adapt EMails in Typo3 with AimeosExtension
You only need that configuration if you want to use a differently named template. In all other cases, you can simply create a new template with the same name. The reason why you didn't notice any change was that you've changed the wrong template. Please have a look into the subdirectories where the "intro" templates for specific payment status are stored: https://github.com/aimeos/ai-client-htm ... il/payment
You can find the list of available payment status values here:
https://github.com/aimeos/aimeos-core/b ... e.php#L105
You can find the list of available payment status values here:
https://github.com/aimeos/aimeos-core/b ... e.php#L105
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
-
- Posts: 11
- Joined: 21 Dec 2016, 10:22
Re: Adapt EMails in Typo3 with AimeosExtension
Hi there,
thanks for the answer, but I can not get this to work. You said i changed the wrong template. So is this path somewhere wrong?
My Aimeos Extension is working fine. So i can overwrite for example the basket body
Sorry but i dont know whats wrong.
thanks for the answer, but I can not get this to work. You said i changed the wrong template. So is this path somewhere wrong?
Code: Select all
typo3conf/ext/schwabenpark_shop/Resources/Private/Extensions/schwabenpark_shop/client/html/templates/email/payment/6/html-intro-body-default.php
Code: Select all
typo3conf/ext/schwabenpark_shop/Resources/Private/Extensions/schwabenpark_shop/client/html/templates/basket/standard/body-default.php
Re: Adapt EMails in Typo3 with AimeosExtension
That's the right template and you now have to remove the configuration you've added in the scheduler task.DrDickGind wrote:Code: Select all
typo3conf/ext/schwabenpark_shop/Resources/Private/Extensions/schwabenpark_shop/client/html/templates/email/payment/6/html-intro-body-default.php
The reason behind is that by using the configuration "plugin.tx_aimeos.settings.client.html.email.payment.html.standard.template-body", you are effectively set your template for all payment status values which isn't what you want. Without this configuration, the template for the actual payment status is chosen.
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
-
- Posts: 11
- Joined: 21 Dec 2016, 10:22
Re: Adapt EMails in Typo3 with AimeosExtension
Hi thanks for the answer.
Yes i have removed my TypoScript config from the Scheduler Aimeos Email Task, and the Problem like I said in my first post still exists: The Scheduler Task for Emails is not using the Extensions Templates but the original ones... Any Ideas?
Thanks
Yes i have removed my TypoScript config from the Scheduler Aimeos Email Task, and the Problem like I said in my first post still exists: The Scheduler Task for Emails is not using the Extensions Templates but the original ones... Any Ideas?
Thanks
Re: Adapt EMails in Typo3 with AimeosExtension
Could you please add the "ai-client-html" line to the schwabenpark_shop/manifest.php:
I guess it's the missing dependency that causes the original template to be used in that case.
Code: Select all
'depends' => array(
'aimeos-core',
'ai-client-html',
),
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
-
- Posts: 11
- Joined: 21 Dec 2016, 10:22
Re: Adapt EMails in Typo3 with AimeosExtension
Hi aimeos,
You were right, the ai-client-html was missing in the manifest.php. Ich changed it, cleared all cache in the installtool and no luck...
Today I wanted to override Standard.php in client/html/src/Client/Html/Checkout/Standard/Summary/Option/ also this didnt work. Or I am not supposed to override things in the src dir with my extension? May something in my extension is broken?
As always thank you
You were right, the ai-client-html was missing in the manifest.php. Ich changed it, cleared all cache in the installtool and no luck...
Today I wanted to override Standard.php in client/html/src/Client/Html/Checkout/Standard/Summary/Option/ also this didnt work. Or I am not supposed to override things in the src dir with my extension? May something in my extension is broken?
As always thank you
Re: Adapt EMails in Typo3 with AimeosExtension
We've found another potential problem for overwriting the e-mail templates. Could you please add the "client/html/templates" line to the schwabenpark_shop/manifest.php:
If that fixes the problem, we will update the extension generator on the aimeos.org website.
Regarding classes, no it doesn't work that way. You can only overwrite templates. Classes must be extended in an OOP way and the name of the new class configured. In your case you have to use:
https://aimeos.org/docs/Configuration/C ... ption/name
Code: Select all
'controller/jobs/templates' => array(
'controller/jobs/templates',
'client/html/templates',
),
Regarding classes, no it doesn't work that way. You can only overwrite templates. Classes must be extended in an OOP way and the name of the new class configured. In your case you have to use:
https://aimeos.org/docs/Configuration/C ... ption/name
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
-
- Posts: 11
- Joined: 21 Dec 2016, 10:22
Re: Adapt EMails in Typo3 with AimeosExtension
Hi aimeos,
A big thanks to you, i added the "client/html/templates" line, as you mentioned and now everything work as expected
This 'Bug' was too hard to find for me . So please update your extension generator on aimeos.org.
Many thanks
A big thanks to you, i added the "client/html/templates" line, as you mentioned and now everything work as expected
This 'Bug' was too hard to find for me . So please update your extension generator on aimeos.org.
Many thanks