Zum Inhalt springen

Bestätigungsmail

Erstellt am 6. Dezember 2005 · 7 Antworten · letzte Antwort am 9. Oktober 2006

Tags: E-Mail-Versand, Frage

dirkp ·

Hallo zusammen,

gibt es eine Möglichkeit an den Besteller und an den shop verschiedene E-Mails zu versenden (unterschiedlichen Inhalt)?

z.B.
Besteller - Inhalt in englisch
Shop - Inhalt in deutsch

dirkp

dirkp ·

Hallo Herr Flink

ich habe die Lösung programmiert !!!

Datei: class.tx_ttproducts_finalize_div.php

Zeile 184

Änderungen in beiden PHP-Script-Ausschnitten
- Zeilen 2,3 ($emailContent_shop)
- Zeilen 13 - 20 ($parts_shop, $subject_shop, $plain_message_shop)

- Zeile 16 (2. PHP-Script)

if (count($recipients))	{  $emailContent=trim($basket->getBasket($tmp='','###EMAIL_PLAINTEXT_TEMPLATE###'));
$emailContent_shop=trim($basket->getBasket($tmp='','###EMAIL_PLAINTEXT_TEMPLATE_SHOP###'));
  if ($emailContent & $emailContent_shop)	{
	$parts = preg_split('/[\n\r]+/',$emailContent,2);
	$subject=trim($parts[0]);
	$plain_message=trim($parts[1]);

	if (empty($plain_message)) {	
		$plain_message = $subject;
		$subject = $conf['orderEmail_subject'];
	}
        
        $parts_shop = preg_split('/[\n\r]+/',$emailContent_shop,2);	
        $subject_shop=trim($parts_shop[0]);
	$plain_message_shop=trim($parts_shop[1]);

        if (empty($plain_message_shop)) {	
		$plain_message_shop = $subject_shop;
		$subject_shop = $conf['orderEmail_subject'];
        }

	$cls  = t3lib_div::makeInstanceClassName('tx_ttproducts_htmlmail');

       ...

sowie in der else Anweisung der
if (class_exists($cls) && $conf['orderEmail_htmlmail'])-Schleife

if (class_exists($cls) && $conf['orderEmail_htmlmail'])  {
  ...

} else {		
    foreach ($recipients as $key => $recipient) {
	// $headers variable removed everywhere!
	// is it the customer ?
	if ($recipient == $basket->personInfo['email']) { 
		tx_ttproducts_email_div::send_mail($recipient, $subject, $plain_message, $conf['orderEmail_from'], $conf['orderEmail_fromName'], $conf['AGBattachment']);
	} else { // others dependant on category
		$addcsv = '';
		if ($conf['generateCSV']) {
			$addcsv = $csvfilepath;
		}

                tx_ttproducts_email_div::send_mail($recipient, $subject_shop, $plain_message_shop, $basket->personInfo['email'], $basket->personInfo['name'], $addcsv);
	}
    }
}

Desweiteren muss in der tmpl-Datei noch eine Marker

- ###EMAIL_PLAINTEXT_TEMPLATE_SHOP###

gesetzt werden, in dem der Inhalt für die E-Mail an den Shop-Betreiber steht.

<h3>EMAIL_PLAINTEXT_TEMPLATE_SHOP</h3>
<h2>E-Mail für den Shop-Betreiber</h2>
<pre>
<!-- ###EMAIL_PLAINTEXT_TEMPLATE_SHOP### begin -->

Bestellung "###ORDER_UID###"

Bestellung:
...

<!-- ###EMAIL_PLAINTEXT_TEMPLATE_SHOP### end -->
</pre>

[/i]

RChristian ·

Kann es sein das die oben genannten änderungen in tt_products 2.5.1 nicht mehr vorhanden sind oder was muß ich einstellen damit der shop betreiber eine andere email bekommt als der kunde???

mfg,
RChristian