Adapt payment email to customer dependent on chosen products

Questions around the TYPO3 integration and plugins
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!
Dennis
Posts: 15
Joined: 30 Nov 2016, 09:16

Adapt payment email to customer dependent on chosen products

Post by Dennis » 30 Nov 2016, 10:19

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

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: Adapt payment email to customer dependent on chosen prod

Post by aimeos » 30 Nov 2016, 11:35

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Dennis
Posts: 15
Joined: 30 Nov 2016, 09:16

Re: Adapt payment email to customer dependent on chosen prod

Post by Dennis » 02 Dec 2016, 15:46

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

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: Adapt payment email to customer dependent on chosen prod

Post by aimeos » 05 Dec 2016, 14:15

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply