Page 1 of 1

Adapt payment email to customer dependent on chosen products

Posted: 30 Nov 2016, 10:19
by Dennis
Hi,

in my project the payment email should look different dependent on the products the costumer has chosen to buy. More precisely, a customer can buy special codes (in addition to normal products) and if these codes are bought these codes should be displayed in the email response, too.

What is the best way to achieve this feature in aimeos? Where in the code do I have to work on? How can I check if a customer has bought a special product in the email generating code?

Many thanks in advance!

TYPO3 7.6.13, Aimeos web shop 16.10.1, PHP version 5.6.24-0+deb8u1, Linux

Re: Adapt payment email to customer dependent on chosen prod

Posted: 30 Nov 2016, 11:35
by aimeos
We've done the same for the downloads.

For the HTML e-mail there's a shared template (together with basket and summary):
https://github.com/aimeos/ai-client-htm ... t.php#L250

For the text e-mails, you will find the code there:
https://github.com/aimeos/ai-client-htm ... lt.php#L82

Re: Adapt payment email to customer dependent on chosen prod

Posted: 02 Dec 2016, 15:46
by Dennis
Hi,

first of all many thanks for your quick and useful answers!
For the HTML e-mail there's a shared template (together with basket and summary):
https://github.com/aimeos/ai-client-htm ... t.php#L250
I have successfully overwritten other templates like "catalog/lists/items-body-default" (I used your cool tool on https://aimeos.org/developer/extensions/ to create an own extension). But when I overwrite the template you mentioned ("common/summary/detail-body-default") under "typo3conf\ext\extendedaimeos\Resources\Private\Extensions\extendedaimeos\client\html\templates\common\summary\detail-body-default.php" I see only the effects of changing the template when looking at the basket and at the summary but for the email still the template under "typo3conf\ext\aimeos\Resources\Private\Extensions\ai-client-html\client\html\templates\common\summary\detail-body-default.php" is used. I see that making changes there in parallel.

On "https://aimeos.org/docs/Configuration/C ... ment_email" there is written:
All order summary subparts use the shared summary subparts, so changes for the basket or checkout summary are automatically reflected in the HTML e-mails. For more information please have a look at the article about adapting the common summary subparts.
... It is the same as you said but apparently it is not right any more for the current version? It is confusing and I do not see a solution. Help would be very great! Have a nice weekend!

TYPO3 7.6.13, Aimeos web shop 16.10.1, PHP version 5.6.24-0+deb8u1, Linux

Re: Adapt payment email to customer dependent on chosen prod

Posted: 05 Dec 2016, 14:15
by aimeos
In TYPO3 you need to add the configuration in the TypoScript field of the scheduler task too. Otherwise, it's only used for the frontend.