Pdf in all paymantemails

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!
Shopmister
Posts: 92
Joined: 15 Jan 2021, 11:02

Pdf in all paymantemails

Post by Shopmister » 19 Mar 2021, 13:39

Hey,

TYPO3 Version
10.4.12
Webserver
Apache
PHP Version
7.3.27-1~deb10u1
Database (Default)
MySQL 5.5.5-10.3.27-MariaDB-0+deb10u1
Application Context
Production
Operating System
Linux 4.19.0-9-amd64
Last Scheduler run
19-03-21 at 14:15, Duration 0 min, (started automatically)


i have the question how i can let send an automatically pdf in the mail. Not only by the paymantmethod "invoice".
and
Where i can set the ibandata/bankdata from supplier for the customer emails/pdffiles. Only in the template or in backend? Logical would be for me to set the ibandata in the supplierstab in backend, like the supplier adress and so. Maybe you guys can make it possible in the next update? or its possible about typoscript or something else?
Thanks

I know the doku about the subpartthings, but some things arent maybe up to date, like here:
typo3-extension-f16/how-to-deactivate-p ... t3069.html

I dont have any idea what to do. I hope you can help me :)

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

Re: Pdf in all paymantemails

Post by aimeos » 22 Mar 2021, 14:02

Shopmister wrote: 19 Mar 2021, 13:39 i have the question how i can let send an automatically pdf in the mail. Not only by the paymantmethod "invoice".
PDFs are only generated for the payment related e-mails. If you want to add it to the delivery related e-mails, you would have to copy the PDF subpart from the payment e-mails to the delivery e-mails:
- https://github.com/aimeos/ai-client-htm ... ayment/Pdf
- https://github.com/aimeos/ai-client-htm ... andard.php
Shopmister wrote: 19 Mar 2021, 13:39 Where i can set the ibandata/bankdata from supplier for the customer emails/pdffiles. Only in the template or in backend? Logical would be for me to set the ibandata in the supplierstab in backend, like the supplier adress and so. Maybe you guys can make it possible in the next update? or its possible about typoscript or something else?
You should add that to the template generating the PDF:
https://github.com/aimeos/ai-client-htm ... andard.php

You can make it configurable and add the details to the TSconfig field of the scheduler task.
Shopmister wrote: 19 Mar 2021, 13:39 I know the doku about the subpartthings, but some things arent maybe up to date, like here:
typo3-extension-f16/how-to-deactivate-p ... t3069.html
Remember that the settings have to be added to the TSConfig field of the scheduler task, not to the frontend config.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Shopmister
Posts: 92
Joined: 15 Jan 2021, 11:02

Re: Pdf in all paymantemails

Post by Shopmister » 22 Mar 2021, 15:00

PDFs are only generated for the payment related e-mails. If you want to add it to the delivery related e-mails, you would have to copy the PDF subpart from the payment e-mails to the delivery e-mails:
- https://github.com/aimeos/ai-client-htm ... ayment/Pdf
- https://github.com/aimeos/ai-client-htm ... andard.php
I mean not in all mails. Only in all paymant related mails i want the pdf. Thats what i mean :). or i missunderstood? Only at the paymant method invoice, a pdf is attached in the paymant related emails. And not at example for prepaymants.
You should add that to the template generating the PDF:
https://github.com/aimeos/ai-client-htm ... andard.php
You can make it configurable and add the details to the TSconfig field of the scheduler task.
I understand right? I have to add to the template. and if i want to can add it in the schedulertask, i need to make it configurable with php? Thens nothing for me, because im a nub in php ^^.

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

Re: Pdf in all paymantemails

Post by aimeos » 24 Mar 2021, 17:39

Shopmister wrote: 22 Mar 2021, 15:00 I mean not in all mails. Only in all paymant related mails i want the pdf. Thats what i mean :). or i missunderstood? Only at the paymant method invoice, a pdf is attached in the paymant related emails. And not at example for prepaymants.
The PDF is currently restricted to payment status "authorized" and "received":
https://github.com/aimeos/ai-client-htm ... hp#L71-L73

The pre-payment option sets the status to "pending", so no PDF is included there. I think we should remove that restriction in the next update.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Shopmister
Posts: 92
Joined: 15 Jan 2021, 11:02

Re: Pdf in all paymantemails

Post by Shopmister » 25 Mar 2021, 13:18

The pre-payment option sets the status to "pending", so no PDF is included there. I think we should remove that restriction in the next update.
Yes, that would be good. Maybe you guys can give the Supplier in backend, ibandata too. BEcause i think it makes much sence to give every supplier like the adressdata, the ibandata too :). Then it would be easy to have different ibandata for every supplier , and this automatically used in the pdf, would be perfect then :).

I tryed for now to write the Bankdata in the normal mail for the prepaymant in the de.po:
msgstr "Die Bestellung wird ausgeliefert sobald wir die Zahlung vollständig erhalten haben. Wenn Sie sich für Vorauskasse entschieden haben, überweisen Sie bitte den Betrag auf unser Bankkonto und geben die Bestellnummer %1$s als Referenz an. Folgend die Kontodaten auf das Sie das Geld überweisen können:
<table cellpadding="0.5" style="font-size: 8px">

<tr>
<td>Adresse und so</td>
<td>District court: </td>
<td>Bank: bankname Lala</td>
</tr>
<tr>
<td>Telephone: </td>
<td>Managing director: </td>
<td>IBAN:45435345345345345345 </td>
</tr>
<tr>
<td>E-Mail: </td>
<td>VAT ID: </td>
<td>BIC: </td>
</tr>
</table>
"


But no change in the email. Wich is the exactly part where i have to paste it? to have the bankdata in mail

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

Re: Pdf in all paymantemails

Post by aimeos » 28 Mar 2021, 07:23

Shopmister wrote: 25 Mar 2021, 13:18
The pre-payment option sets the status to "pending", so no PDF is included there. I think we should remove that restriction in the next update.
Yes, that would be good.
Done and will be available in the next release.
Shopmister wrote: 25 Mar 2021, 13:18 Maybe you guys can give the Supplier in backend, ibandata too. BEcause i think it makes much sence to give every supplier like the adressdata, the ibandata too :). Then it would be easy to have different ibandata for every supplier , and this automatically used in the pdf, would be perfect then :).
Don't know if the supplier is the right place because usually, suppliers are no vendors. How do you use suppliers in Aimeos? Do you have several of them?
Shopmister wrote: 25 Mar 2021, 13:18 I tryed for now to write the Bankdata in the normal mail for the prepaymant in the de.po:
The .po files have to be transformed to binary Gettext MO files:

Code: Select all

msgfmt --statistics -c -o de de.po
This article describes how to overwrite translations using Gettext files:
https://aimeos.org/docs/latest/developer/translations/

In TYPO3, you can also overwrite translations by TypoScript:
https://aimeos.org/docs/latest/typo3/cu ... anslations
and something like that in the TSConfig field of the scheduler task may work (keep care about the "\" character which might need escaping to "\\"):

Code: Select all

i18n.de.0 {
  domain = client
  string ( The order is pending until we receive the final payment. If you\'ve chosen to pay in advance, please transfer the money to our bank account with the order ID %1$s as reference.
  )
  trans (
  Die Bestellung wird ausgeliefert sobald wir die Zahlung vollständig erhalten haben. Wenn Sie sich für Vorauskasse entschieden haben, überweisen Sie bitte den Betrag auf unser Bankkonto und geben die Bestellnummer %1$s als Referenz an. Folgend die Kontodaten auf das Sie das Geld überweisen können:
		<table cellpadding="0.5" style="font-size: 8px">
		
			<tr>
				<td>Adresse und so</td>
				<td>District court: </td>
				<td>Bank: bankname Lala</td>
			</tr>
			<tr>
				<td>Telephone: </td>
				<td>Managing director: </td>
				<td>IBAN:45435345345345345345 </td>
			</tr>
			<tr>
				<td>E-Mail: </td>
				<td>VAT ID: </td>
				<td>BIC: </td>
			</tr>
		</table>
  )
}
Original string: https://github.com/aimeos/ai-client-htm ... d.php#L538
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Shopmister
Posts: 92
Joined: 15 Jan 2021, 11:02

Re: Pdf in all paymantemails

Post by Shopmister » 29 Mar 2021, 13:44

Done and will be available in the next release.
Very great, thanks a lot!
Do you have an idea when around the next update is planned? I was a few days to late with my question i think :D
Don't know if the supplier is the right place because usually, suppliers are no vendors. How do you use suppliers in Aimeos? Do you have several of them?
I tryed to find out what exactly suppliers are. In German the word is "Lieferant" My result was suppliers/Lieferanten are firms they sell things to the customer. Yea i wanted to have in short term not a several but a view of them. :)
For AImeos are suppliers/Lieferanten no vendors i see. I thougt long about this theme. FOr me it was complicated ^^.
Whatts for Aimeos an Supplier/Lieferant? Whatts the plan behind.
The .po files have to be transformed to binary Gettext MO files:
and something like that in the TSConfig field of the scheduler task may work (keep care about the "\" character which might need escaping to "\\"):
I did it about typoscript:
Much more easier
SO it works about the scheduler typoscript:
plugin.tx_aimeos.settings.i18n.de {
0 {
domain = client
string = The order is pending until we receive the final payment. If you've chosen to pay in advance, please transfer the money to our bank account with the order ID %1$s as reference.
trans = Die Bestellung wird ausgeliefert sobald wir die Zahlung vollstaendig erhalten haben. Wenn Sie sich fuer Vorauskasse entschieden haben, Ueberweisen Sie bitte den Betrag auf unser Bankkonto und geben die Bestellnummer %1$s als Referenz an. Folgend die Kontodaten auf das Sie das Geld überweisen können: Bankname ==> Bank Denzig Kontoinhaber ==> Inhaber IBAN ==> DE02303

}

}

No wondering: the "==>" is only because not more than one " " between words are allowed ^^.

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

Re: Pdf in all paymantemails

Post by aimeos » 02 Apr 2021, 17:09

Shopmister wrote: 29 Mar 2021, 13:44 Do you have an idea when around the next update is planned? I was a few days to late with my question i think :D
A new 2020.10 release will be available in ca. six weeks.
Shopmister wrote: 29 Mar 2021, 13:44 Whatts for Aimeos an Supplier/Lieferant? Whatts the plan behind.
Suppliers are manufacturers or brands like Addidas for sneakers but you can use them for other entities like distributors too.
Shopmister wrote: 29 Mar 2021, 13:44 No wondering: the "==>" is only because not more than one " " between words are allowed ^^.
Multiple white spaces are collapsed in HTML and TCPDF converts the HTML code to PDF.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply