Master00 Posted January 12, 2007 Share Posted January 12, 2007 Hi everyone. I would like to ask for some support on this because i don't know coding but im trying to learn somehow. I downloaded this contribution: EmailOrderText_1_4 and it works perfectly. But i would like to display the products like they appear in the products list page with those tables with image, product name and price. In my opinion i think the checkout_process.php needs to be tweaked. In the installation readme it says: # Edit in /catalog/checkout_process.php ############################################ >>>>> LOOK FOR THE FOLLOWING CODE: >>>>>>>>>>>>>>>>BEGIN>>>>>>>>>>>>>> //------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"; } } <<<<END<<<< ...AND EXCHANGE THIS WITH THE FOLLOWING: >>>>BEGIN>>>>> //------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; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<END<<<<<<<<<<< and i think it must be somewhere around this line: $text = preg_replace('/<-Item_List->/', $products_ordered, $text); maybe it just needs to be pointed to some other variable. Any of you that understands the code come point me in some direction? Any help would be apreciated. But be aware i dont know much about coding. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.