/////////////////////////////////////////////////////////////// Hallo lieber OSCommerce Fan, das folgende Contribution erlaubt es Ihnen über Ihre Administration HTML- oder Text Emails für Ihre Bestell-Bestätigungs Mail zu editieren und Platzhalter an der Stelle zu platzieren wo Sie die entsprechende Informationen in der Email haben möchten. Dieses Tool wurde für die Version 2.2 geschrieben. Ich würde mich natürlich über einen kleinen Link zu meiner Homepage in Ihrem Shop freuen, muss aber nicht ( http://www.shopto.de ). Vieleicht haben Sie ja auch eine neue Idee für Ihren bestehenden Shop und ich kann Ihnen bei der Umsetzung helfen. Wenn Sie Fragen haben können Sie gerne meine Homepage besuchen :-). Wenn Sie einen Bug finden bitte Email an "autodns@freenet.de" Dirk Pagador (Programmierer) ///////////////////////////////////////////////////////////// Neu in Version 1.4_FCK: Anstatt des veralteten HTMLArea Editors kommt nun der FCK Editor zum Einsatz. Dieser kann hier heruntergeladen werden: http://www.fckeditor.net/ Installation des Editors is sehr einfach und wird hier gut beschrieben: http://addons.oscommerce.com/info/5679 Geändert wurde lediglich die /catalog/admin/email_order_text.php ////////////////////////////////////////////////////////////// Bevor sie Dateien ändern bitte Backup+++Backup+++Backup+++Backup+++Backup+++Backup+++Backup+++Backup+++ INSTALATIONSANLEITUNG Schritt 1 Legen Sie zuerst die Tabelle in Ihrer Shopdatenbank an: Dafür finden Sie die "email_oder.sql" im Paket. Importieren Sie die Datei z.B. mit PhpMyAdmin oder kopieren Sie den gesamten Inhalt und führen es als SQL Befehl aus (z.B. über PhpMyAdmin) Schritt 2 Kopieren Sie die gesamte Struktur des Paketes in Ihren Shop, so wie es ist. Darin enthalten sind nur neue Dateien. Bestehende Dateien müssen Sie, wie weiter unten beschrieben, per "Hand" ändern. Schritt 3 Nun tauschen Sie den php-Code in den folgenden Dateien, wie beschrieben, aus: # Editieren in /catalog/admin/includes/column_left.php ####################################################### >>>>> SUCHEN SIE FOLGENDEN CODE: >>>>>>>>>>>>>>>>ANFANG>>>>>>>>>>>>>> require(DIR_WS_BOXES . 'tools.php'); <<<>>>>>ANFANG>>>>> require(DIR_WS_BOXES . 'tools.php'); require(DIR_WS_BOXES . 'email_order_text.php'); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>> SUCHEN SIE FOLGENDEN CODE: >>>>>>>>>>>>>>>>ANFANG>>>>>>>>>>>>>> define('FILENAME_ZONES', 'zones.php'); <<<>>>>>ANFANG>>>>> define('FILENAME_ZONES', 'zones.php'); define('FILENAME_EMAIL_ORDER_TEXT', 'email_order_text.php'); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>> SUCHEN SIE FOLGENDEN CODE: >>>>>>>>>>>>>>>>ANFANG>>>>>>>>>>>>>> define('WARNING_FILE_UPLOADS_DISABLED', 'Warning: File uploads are disabled in the php.ini configuration file.'); <<<>>>>>ANFANG>>>>> define('WARNING_FILE_UPLOADS_DISABLED', 'Warning: File uploads are disabled in the php.ini configuration file.'); define('BOX_HEADING_EMAIL_ORDER_TEXT', 'Bestätigungs Mail'); define('BOX_EMAIL_ORDER_TEXT', 'EMail-Text editieren'); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>> SUCHEN SIE FOLGENDEN CODE: >>>>>>>>>>>>>>>>ANFANG>>>>>>>>>>>>>> // initialized for the email confirmation $products_ordered = ''; $subtotal = 0; $total_tax = 0; <<<>>>>>ANFANG>>>>> $order_totals_table_beginn = ''; $order_totals_zelle_beginn = ''; $order_totals_table_end = '
'; $order_totals_zelle_mitte = ''; $order_totals_zelle_end = '
'; // initialized for the email confirmation if (EMAIL_USE_HTML == 'true'){ $products_ordered = $order_totals_table_beginn; } else{ $products_ordered = ''; } $subtotal = 0; $total_tax = 0; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>> SUCHEN SIE FOLGENDEN CODE: >>>>>>>>>>>>>>>>ANFANG>>>>>>>>>>>>>> //------insert customer choosen option eof ---- $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']); $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty']; $total_cost += $total_products_price; $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n"; } // lets start with the email confirmation $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n"; if (is_object($$payment)) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $payment_class = $$payment; $email_order .= $payment_class->title . "\n\n"; if ($payment_class->email_footer) { $email_order .= $payment_class->email_footer . "\n\n"; } } <<<>>>ANFANG>>>>> //------insert customer choosen option eof ---- $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']); $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty']; $total_cost += $total_products_price; if (EMAIL_USE_HTML == 'true'){ $products_ordered .= $order_totals_zelle_beginn . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $order_totals_zelle_mitte . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . $order_totals_zelle_end; } else{ $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n"; } } if (EMAIL_USE_HTML == 'true'){ $products_ordered .= $order_totals_table_end; } if (EMAIL_USE_HTML == 'true'){ $text_query = tep_db_query("SELECT * FROM eorder_text where eorder_text_id = '2' and language_id = '" . $languages_id . "'"); } else{ $text_query = tep_db_query("SELECT * FROM eorder_text where eorder_text_id = '1' and language_id = '" . $languages_id . "'"); } $werte = tep_db_fetch_array($text_query); $text = $werte["eorder_text_one"]; $text = preg_replace('/<-STORE_NAME->/', STORE_NAME, $text); $text = preg_replace('/<-insert_id->/', $insert_id, $text); $text = preg_replace('/<-INVOICE_URL->/', tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false), $text); $text = preg_replace('/<-DATE_ORDERED->/', strftime(DATE_FORMAT_LONG), $text); if ($order->info['comments']) { $text = preg_replace('/<-Customer_Comments->/', tep_db_output($order->info['comments']), $text); } else{ $text = preg_replace('/<-Customer_Comments->/', '', $text); } $text = preg_replace('/<-Item_List->/', $products_ordered, $text); if (EMAIL_USE_HTML == 'true'){ $list_total = $order_totals_table_beginn; for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $list_total .= $order_totals_zelle_beginn . strip_tags($order_totals[$i]['title']) . $order_totals_zelle_mitte . strip_tags($order_totals[$i]['text']) . $order_totals_zelle_end; } $list_total .= $order_totals_table_end; } else{ for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $list_total .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } } $text = preg_replace('/<-List_Total->/', $list_total, $text); if ($order->content_type != 'virtual') { $text = preg_replace('/<-DELIVERY_Adress->/', tep_address_label($customer_id, $sendto, 0, '', "\n"), $text); } elseif($order->content_type == 'virtual') { if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) { $text = preg_replace('/<-DELIVERY_Adress->/', "Nach Zahlungseingang können Sie Ihr Produkt hier downloaden. Sie erhalten dann eine seperate EMail: \n" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false), $text); } else{ $text = preg_replace('/<-DELIVERY_Adress->/', '', $text); } } else{ $text = preg_replace('/<-DELIVERY_Adress->/', '', $text); } $text = preg_replace('/<-BILL_Adress->/', tep_address_label($customer_id, $billto, 0, '', "\n"), $text); if (is_object($$payment)) { $payment_class = $$payment; $text = preg_replace('/<-Payment_Modul_Text->/', $payment_class->title, $text); if ($payment_class->email_footer) { $text = preg_replace('/<-Payment_Modul_Text_Footer->/', $payment_class->email_footer, $text); } } $text = preg_replace('/<-FIRMENANSCHRIFT->/', STORE_NAME_ADDRESS, $text); $text = preg_replace('/<-FINANZAMT->/', OWNER_BANK_FA, $text); $text = preg_replace('/<-STEUERNUMMER->/', OWNER_BANK_TAX_NUMBER, $text); $text = preg_replace('/<-USTID->/', OWNER_BANK_UST_NUMBER, $text); $text = preg_replace('/<-BANKNAME->/', OWNER_BANK_NAME, $text); $text = preg_replace('/<-KONTOINHABER->/', OWNER_BANK_ACCOUNT, $text); $text = preg_replace('/<-BLZ->/', STORE_OWNER_BLZ, $text); $text = preg_replace('/<-KONTONUMMER->/', OWNER_BANK, $text); $text = preg_replace('/<-SWIFT->/', OWNER_BANK_SWIFT, $text); $text = preg_replace('/<-IBAN->/', OWNER_BANK_IBAN, $text); $email_order = $text; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<