Hi, wenn der Shop neu ist. Hast Du wie in der Anleitung hier im Forum die Einstellungen in den betreffenden Code"Schnipseln" wieder eingebaut. Nur dann kommt die PDF Datei ja mit. Ansonsten könntest Du Sie noch in die Bestellbestätigungsmail mit einbauen. Steht dann zwar als langer Text mit drin aber immer noch besser als wenn Sie fehlt. Dann kommen wieder die Abmahnungen.... Gruß Nicole
Da hier immer wieder danach gefragt wird, habe ich mal mit Hilfe einer Lösung von Avanger das so zusammengetragen das zum Beispiel AGB und Widerruf direkt als Text in der Bestellbestätigung angezeigt wird, und zwar genau die, die auch im Content Manager hinterlegt sind. Auch andere Texte oder Inhalte sind möglich die im Content Manager stehen, diese können auch in andere E-Mails wie Statusänderungen eingebaut werden. Den Anhang agb_widerruf_in_E-Mails.zip betrachten
Wir das als PDF mitgeschickt oder ? ansonsten ist es doch schon das was der Shop hat unter email-vorlagen sind doch Variablen hinterlegt die das machen.. versteh ich net ^^ PDF würde oder ist besser
Stimmt, bei der neusten Shop Version ist das jetzt integriert, bei den Vorgängerversionen war das noch nicht, eine Anleitung für pdf gibt es hier im Forum.
Jap die pdf hab ich eingebunden .. agb und widerruf.. aber eine weitere pdf bringt bei mir zu einem error beim kaufabschluss. schön würde sein der 3 pdf auch einen guten zweck zu geben.. das heist eine produktliste oder die 5 besten produkte werden in einer pdf zusammengefasst und erstellt. so hat der kunde die auch mitbekommen in der mail aber wie das automatisch gehen sollte .. ba ich hab nur die idee dazu
-pdf anhänge funktionieren bei mir-danke! Habe in email vorlagen, die html AGB und cancellation gelöscht- wird aber trotzdem noch in bestellbestätigungs-email dargestellt... muss ich noch etwas löschen??? Merci!!! -erledigt. in der .txt Datei müssen auch die AGB und widderufszeilen raus....
Hallo, die PDF Anhänge funktionieren soweit, allerdings erhält der Kunde in der Bestätigungs-email zwei mal die AGBs. Weiß jemand was ich falsch gemacht habe? meine abgeänderten Dateien füge ich nachfolgend ein:
Mach doch keine Bilder vom Code sonder poste mal den Code. Dafür gibts extra die PHP einfüge Box im Forum. Wie sieht der Kunde die 2 mal? Sind es 2 Anhänge die er sieht oder Text oder was genau is doppelt?
Hallo Dennis, es sind drei Veränderungen in 2 Dateien vorgenommen worden. Ich dachte man kann den Fehler auf den ersten Blick erkennen?! Der Kunde erhält eine Bestätigungs-Email, in der die AGBs 2x angehängt sind. Die Widerrufsbelehrung wird nur einmal beigefügt. PHP: <?php/* -------------------------------------------------------------- send_order.php 2009-11-18 gm Gambio GmbH http://www.gambio.de Copyright (c) 2009 Gambio GmbH Released under the GNU General Public License (Version 2) [http://www.gnu.org/licenses/gpl-2.0.html] -------------------------------------------------------------- based on: (c) 2003 nextcommerce (send_order.php,v 1.1 2003/08/24); www.nextcommerce.org (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: send_order.php 1029 2005-07-14 19:08:49Z mz $) Released under the GNU General Public License ---------------------------------------------------------------------------------------*/#prevent direct executionif(defined('DIR_FS_CATALOG') == false) die();$path_to_attachement= DIR_FS_DOCUMENT_ROOT . 'agb.pdf';$path_to_more_attachements= DIR_FS_DOCUMENT_ROOT . 'widerrufsbelehrung.pdf';require_once (DIR_FS_INC.'xtc_get_order_data.inc.php');require_once (DIR_FS_INC.'xtc_get_attributes_model.inc.php');// bof gminclude(DIR_FS_CATALOG . 'gm/inc/gm_save_order.inc.php');// eof gm// check if customer is allowed to send this order!$order_query_check = xtc_db_query("SELECT customers_id FROM ".TABLE_ORDERS." WHERE orders_id='".$insert_id."'");$order_check = xtc_db_fetch_array($order_query_check);if ($_SESSION['customer_id'] == $order_check['customers_id']) { $order = new order($insert_id); if ($_SESSION['paypal_express_new_customer'] == 'true' && $_SESSION['ACCOUNT_PASSWORD']== 'true') { require_once (DIR_FS_INC.'xtc_create_password.inc.php'); require_once (DIR_FS_INC.'xtc_encrypt_password.inc.php'); $password_encrypted = xtc_RandomString(10); $password = xtc_encrypt_password($password_encrypted); xtc_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . $password . "' where customers_id = '" . (int) $_SESSION['customer_id'] . "'"); $smarty->assign('NEW_PASSWORD', $password_encrypted); } $smarty->assign('address_label_customer', xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />')); $smarty->assign('address_label_shipping', xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />')); if ($_SESSION['credit_covers'] != '1') { $smarty->assign('address_label_payment', xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />')); } $smarty->assign('csID', $order->customer['csID']); // BOF GM_MOD: $smarty->assign('customer_vat', $order->customer['vat_id']); $order_total = $order->getTotalData($insert_id); $smarty->assign('order_data', $order->getOrderData($insert_id)); $smarty->assign('order_total', $order_total['data']); // assign language to template for caching $smarty->assign('language', $_SESSION['language']); $smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/'); $smarty->assign('logo_path', HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/'); $smarty->assign('oID', $insert_id); if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') { include (DIR_WS_LANGUAGES.$_SESSION['language'].'/modules/payment/'.$order->info['payment_method'].'.php'); $payment_method = constant(strtoupper('MODULE_PAYMENT_'.$order->info['payment_method'].'_TEXT_TITLE')); $smarty->assign('PAYMENT_MODUL', $order->info['payment_method']); } $smarty->assign('PAYMENT_METHOD', $payment_method); $smarty->assign('DATE', xtc_date_long($order->info['date_purchased'])); $smarty->assign('NAME', $order->customer['name']); $smarty->assign('COMMENTS', $order->info['comments']); $smarty->assign('EMAIL', $order->customer['email_address']); $smarty->assign('PHONE',$order->customer['telephone']); if(defined('EMAIL_SIGNATURE')) { $smarty->assign('EMAIL_SIGNATURE_HTML', nl2br(EMAIL_SIGNATURE)); $smarty->assign('EMAIL_SIGNATURE_TEXT', EMAIL_SIGNATURE); } if (gm_get_conf('GM_SHOW_WITHDRAWAL') == 1) { if (GROUP_CHECK == 'true') { $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'"; } $shop_content_query = xtc_db_query("SELECT content_title, content_heading, content_text, content_file FROM " . TABLE_CONTENT_MANAGER . " WHERE content_group='" . (int)gm_get_conf('GM_WITHDRAWAL_CONTENT_ID') . "' " . $group_check . " AND languages_id='" . $_SESSION['languages_id'] . "'"); $shop_content_data = xtc_db_fetch_array($shop_content_query); $t_withdrawal = trim(strip_tags(str_replace('<br />', "\n", $shop_content_data['content_text']))); $smarty->assign('WITHDRAWAL_HTML', nl2br($t_withdrawal)); $smarty->assign('WITHDRAWAL_TEXT', $t_withdrawal); } if (gm_get_conf('GM_SHOW_CONDITIONS') == 1) { if (GROUP_CHECK == 'true') { $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'"; } $shop_content_query = xtc_db_query("SELECT content_title, content_heading, content_text, content_file FROM " . TABLE_CONTENT_MANAGER . " WHERE content_group='3' " . $group_check . " AND languages_id='" . $_SESSION['languages_id'] . "'"); $shop_content_data = xtc_db_fetch_array($shop_content_query); $t_agb = trim(strip_tags(str_replace('<br />', "\n", $shop_content_data['content_text']))); $smarty->assign('AGB_HTML', nl2br($t_agb)); $smarty->assign('AGB_TEXT', $t_agb); } /* BOF TRUSTED SHOPS RATING */ $obj_widget = MainFactory::create_object('GMTSWidget', array($_SESSION['languages_id'])); $smarty->assign('TS_RATING', $obj_widget->get_rating_link($insert_id, 'GM_TRUSTED_SHOPS_WIDGET_SHOW_CONFIRMATION')); unset($obj_widget); /* EOF TRUSTED SHOPS RATING */ // PAYMENT MODUL TEXTS // EU Bank Transfer if ($order->info['payment_method'] == 'eustandardtransfer') { $smarty->assign('PAYMENT_INFO_HTML', MODULE_PAYMENT_EUTRANSFER_TEXT_DESCRIPTION); $smarty->assign('PAYMENT_INFO_TXT', str_replace("<br />", "\n", MODULE_PAYMENT_EUTRANSFER_TEXT_DESCRIPTION)); } // MONEYORDER if ($order->info['payment_method'] == 'moneyorder') { $smarty->assign('PAYMENT_INFO_HTML', MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION); $smarty->assign('PAYMENT_INFO_TXT', str_replace("<br />", "\n", MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION)); } // HEIDELPAY: heidelpaypp (Vorkasse) if ($order->info['payment_method'] == 'heidelpaypp') { $smarty->assign('PAYMENT_INFO_HTML', $_SESSION['heidelpaypp_data']['emailfooter_html']); $smarty->assign('PAYMENT_INFO_TXT', $_SESSION['heidelpaypp_data']['emailfooter']); } // bof gm $gm_logo_mail = MainFactory::create_object('GMLogoManager', array("gm_logo_mail")); if($gm_logo_mail->logo_use == '1') { $smarty->assign('gm_logo_mail', $gm_logo_mail->get_logo()); } // eof gm // dont allow cache $smarty->caching = false; # JANOLAW START require_once(DIR_FS_CATALOG.'gm/classes/GMJanolaw.php'); $coo_janolaw = new GMJanolaw(); if($coo_janolaw->get_status() == true) { $t_info_html = $coo_janolaw->get_page_content('widerrufsbelehrung', true, true); $t_info_html .= '<br/><br/>AGB<br/><br/>'; $t_info_html .= $coo_janolaw->get_page_content('agb', true, true); $smarty->assign('JANOLAW_INFO_HTML', $t_info_html); $t_info_text = $coo_janolaw->get_page_content('widerrufsbelehrung', false, false); $t_info_text .= "\n\nAGB\n\n"; $t_info_text .= $coo_janolaw->get_page_content('agb', false, false); $smarty->assign('JANOLAW_INFO_TEXT', $t_info_text); } # JANOLAW END $html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/order_mail.html'); $txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/order_mail.txt'); // create subject $order_subject = str_replace('{$nr}', $insert_id, EMAIL_BILLING_SUBJECT_ORDER); $order_subject = str_replace('{$date}', strftime(DATE_FORMAT_LONG), $order_subject); $order_subject = str_replace('{$lastname}', $order->customer['lastname'], $order_subject); $order_subject = str_replace('{$firstname}', $order->customer['firstname'], $order_subject); // send mail to admin // BOF GM_MOD: if(SEND_EMAILS == 'true') { // get the sender mail adress. e.g. Host Europe has problems with the customer mail adress. $from_email_address = $order->customer['email_address']; if(SEND_EMAIL_BY_BILLING_ADRESS == 'SHOP_OWNER') { $from_email_address = EMAIL_BILLING_ADDRESS; } xtc_php_mail($from_email_address, $order->customer['firstname'].' '.$order->customer['lastname'], EMAIL_BILLING_ADDRESS, STORE_NAME, EMAIL_BILLING_FORWARDING_STRING, $order->customer['email_address'], $order->customer['firstname'].' '.$order->customer['lastname'], '', '', $order_subject, $html_mail, $txt_mail); }// send mail to customer//BOF GM_MOD: if(SEND_EMAILS== 'true') $gm_mail_status = xtc_php_mail(EMAIL_BILLING_ADDRESS,EMAIL_BILLING_NAME, $order->customer['email_address'],$order->customer['firstname'].' '.$order->customer['lastname'],'', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME,$path_to_attachement, $path_to_more_attachements, $order_subject,$html_mail, $txt_mail); if($gm_mail_status == false) { $gm_send_order_status = 0; } else { $gm_send_order_status = 1; } gm_save_order($insert_id, $html_mail, $txt_mail, $gm_send_order_status); // eof gm if (AFTERBUY_ACTIVATED == 'true') { require_once (DIR_WS_CLASSES.'afterbuy.php'); $aBUY = new xtc_afterbuy_functions($insert_id); if ($aBUY->order_send()) $aBUY->process_order(); }} else { $smarty->assign('ERROR', 'You are not allowed to view this order!'); $smarty->display(CURRENT_TEMPLATE.'/module/error_message.html');}?> PHP: <?php/* -------------------------------------------------------------- xtc_php_mail.inc.php 2009-12-17 gm Gambio GmbH http://www.gambio.de Copyright (c) 2009 Gambio GmbH Released under the GNU General Public License (Version 2) [http://www.gnu.org/licenses/gpl-2.0.html] -------------------------------------------------------------- based on: (c) 2003 nextcommerce (xtc_php_mail.inc.php,v 1.17 2003/08/24); www.nextcommerce.org (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: xtc_php_mail.inc.php 1129 2005-08-05 11:46:11Z mz $) Released under the GNU General Public License ---------------------------------------------------------------------------------------*/// include the mail classesfunction xtc_php_mail($from_email_address, $from_email_name, $to_email_address, $to_name, $forwarding_to, $reply_address, $reply_address_name, $path_to_attachement, $path_to_more_attachements, $email_subject, $message_body_html, $message_body_plain) { global $mail_error; $mail = new PHPMailer(); $mail->PluginDir = DIR_FS_DOCUMENT_ROOT.'includes/classes/'; if (isset ($_SESSION['language_charset'])) { $mail->CharSet = $_SESSION['language_charset']; } else { $lang_query = "SELECT * FROM ".TABLE_LANGUAGES." WHERE code = '".DEFAULT_LANGUAGE."'"; $lang_query = xtc_db_query($lang_query); $lang_data = xtc_db_fetch_array($lang_query); $mail->CharSet = $lang_data['language_charset']; } if ($_SESSION['language'] == 'german') { $mail->SetLanguage("de", DIR_WS_CLASSES); } else { $mail->SetLanguage("en", DIR_WS_CLASSES); } if (EMAIL_TRANSPORT == 'smtp') { $mail->IsSMTP(); $mail->SMTPKeepAlive = true; // set mailer to use SMTP $mail->SMTPAuth = SMTP_AUTH; // turn on SMTP authentication true/false $mail->Username = SMTP_USERNAME; // SMTP username $mail->Password = SMTP_PASSWORD; // SMTP password $mail->Host = SMTP_MAIN_SERVER.';'.SMTP_Backup_Server; // specify main and backup server "smtp1.example.com;smtp2.example.com" } if (EMAIL_TRANSPORT == 'sendmail') { // set mailer to use SMTP $mail->IsSendmail(); $mail->Sendmail = SENDMAIL_PATH; } if (EMAIL_TRANSPORT == 'mail') { $mail->IsMail(); } if (EMAIL_USE_HTML == 'true') // set email format to HTML { $mail->IsHTML(true); $mail->Body = $message_body_html; // remove html tags $message_body_plain = str_replace('<br />', " \n", $message_body_plain); $message_body_plain = strip_tags($message_body_plain); $mail->AltBody = $message_body_plain; } else { $mail->IsHTML(false); //remove html tags $message_body_plain = str_replace('<br />', " \n", $message_body_plain); $message_body_plain = strip_tags($message_body_plain); $mail->Body = $message_body_plain; } $mail->From = $from_email_address; $mail->Sender = $from_email_address; $mail->FromName = $from_email_name; $mail->AddAddress($to_email_address, $to_name); if ($forwarding_to != '') $mail->AddBCC($forwarding_to); $mail->AddReplyTo($reply_address, $reply_address_name); // BOF GM_MOD: $mail->WordWrap = 76; // set word wrap to 50 characters$mail->AddAttachment($path_to_attachement); // add attachments$mail->AddAttachment($path_to_more_attachements); // optional name if (is_array($path_to_attachement) && sizeof($path_to_attachement > 0)) { foreach($path_to_attachement as $attachent) { $mail->AddAttachment($attachent); }} else { $mail->AddAttachment($path_to_attachement); // add attachments} $mail->Subject = $email_subject; if (!$mail->Send()) { return false; } else { return true; }}?>
Du fügst die AGB doppelt ein: PHP: // BOF GM_MOD: $mail->WordWrap = 76; // set word wrap to 50 characters$mail->AddAttachment($path_to_attachement); // add attachments$mail->AddAttachment($path_to_more_attachements); // optional name --!<if (is_array($path_to_attachement) && sizeof($path_to_attachement > 0)) { foreach($path_to_attachement as $attachent) { $mail->AddAttachment($attachent); }} else { $mail->AddAttachment($path_to_attachement); // add attachments}
Woher hast Du diese Zeilen? (inc/xtc_php_mail.inc.php) PHP: >if (is_array($path_to_attachement) && sizeof($path_to_attachement > 0)) { foreach($path_to_attachement as $attachent) { $mail->AddAttachment($attachent); }} else { $mail->AddAttachment($path_to_attachement); // add attachments Die habe ich nicht und die sind auch nicht in der aktuellen Version.
Tipp 1: Dokumentiere Deine Änderungen, sonst verliert man sehr schnell den Überblick Tipp2: Kennzeichne Deine Änderungen auch in der Datei, z.B. durch // pdf Anhang Dann weißt Du wofür welche Anpassung da ist Ist auch sehr Hilfreich wenn man eine Anpassung rückgängig machen möchte. Ich würde die Datei auf den PC runterladen (Sicherung) und die Zeilen Löschen. Danach ausgiebig Testen. (Das ganze am besten im Testshop.)