Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Send_order_html_email


Elazar

Recommended Posts

yes but i don't find where i can add them, because i don't find the intructions text for the payement by check (Mail In Payment).

 

Do you know that ? It isn't in the language module for the check, because it is not a module.

 

thanks

If we are refering to the same addon, it is a module and it is callelled in mailin.php

Link to comment
Share on other sites

  • Replies 344
  • Created
  • Last Reply

Top Posters In This Topic

First I will like to thank every one for this great contribution

And support.

 

I have everything working great, my only problem is after the customer places an order they get 2 emails the original default email from oscommerce and the new email invoice

Can some one tell me were in the code do I disable the default order email

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

Thank you for this great contribution.

 

I have CCGV installed but I have problem to add the code to offer a gift voucher or a discount coupon to a new customer in the create account email.

 

Somebody else already tried?

 

Thank you

Link to comment
Share on other sites

  • 2 weeks later...

Hi - thx for a great contrib - having some trouble with it though:

 

There are no products listed in the confirmation mail???!!! (testing mode.... ) :

order_forum.jpg

 

Can anyone PLEEEEEASE help - I'm going nuts trying to solve it!!!

 

Gav

Link to comment
Share on other sites

Here is my catalog/checkout_process.php :

<?php

/*

$Id: checkout_process.php,v 1.128 2003/05/28 18:00:29 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

include('includes/application_top.php');

 

// if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

if (!tep_session_is_registered('sendto')) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

}

 

if ( (tep_not_null(MODULE_PAYMENT_INSTALLED)) && (!tep_session_is_registered('payment')) ) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

}

 

// avoid hack attempts during the checkout procedure by checking the internal cartID

if (isset($cart->cartID) && tep_session_is_registered('cartID')) {

if ($cart->cartID != $cartID) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

}

}

 

include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);

 

// load selected payment module

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment($payment);

 

// load the selected shipping module

require(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping($shipping);

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

 

// load the before_process function from the payment modules

$payment_modules->before_process();

 

$sql_data_array = array('customers_id' => $customer_id,

'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],

'customers_company' => $order->customer['company'],

'customers_street_address' => $order->customer['street_address'],

'customers_suburb' => $order->customer['suburb'],

'customers_city' => $order->customer['city'],

'customers_postcode' => $order->customer['postcode'],

'customers_state' => $order->customer['state'],

'customers_country' => $order->customer['country']['title'],

'customers_telephone' => $order->customer['telephone'],

'customers_email_address' => $order->customer['email_address'],

'customers_address_format_id' => $order->customer['format_id'],

'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],

'delivery_company' => $order->delivery['company'],

'delivery_street_address' => $order->delivery['street_address'],

'delivery_suburb' => $order->delivery['suburb'],

'delivery_city' => $order->delivery['city'],

'delivery_postcode' => $order->delivery['postcode'],

'delivery_state' => $order->delivery['state'],

'delivery_country' => $order->delivery['country']['title'],

'delivery_address_format_id' => $order->delivery['format_id'],

'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'],

'billing_company' => $order->billing['company'],

'billing_street_address' => $order->billing['street_address'],

'billing_suburb' => $order->billing['suburb'],

'billing_city' => $order->billing['city'],

'billing_postcode' => $order->billing['postcode'],

'billing_state' => $order->billing['state'],

'billing_country' => $order->billing['country']['title'],

'billing_address_format_id' => $order->billing['format_id'],

'payment_method' => $order->info['payment_method'],

'shipping_module' => $shipping['id'],

'cc_type' => $order->info['cc_type'],

'cc_owner' => $order->info['cc_owner'],

'cc_number' => $order->info['cc_number'],

'cc_expires' => $order->info['cc_expires'],

'date_purchased' => 'now()',

'orders_status' => $order->info['order_status'],

'currency' => $order->info['currency'],

'currency_value' => $order->info['currency_value']);

tep_db_perform(TABLE_ORDERS, $sql_data_array);

$insert_id = tep_db_insert_id();

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

$sql_data_array = array('orders_id' => $insert_id,

'title' => $order_totals[$i]['title'],

'text' => $order_totals[$i]['text'],

'value' => $order_totals[$i]['value'],

'class' => $order_totals[$i]['code'],

'sort_order' => $order_totals[$i]['sort_order']);

tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);

}

 

$customer_notification = (SEND_EMAILS == 'true') ? '1' : '0';

$sql_data_array = array('orders_id' => $insert_id,

'orders_status_id' => $order->info['order_status'],

'date_added' => 'now()',

'customer_notified' => $customer_notification,

'comments' => $order->info['comments']);

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

//kgt - discount coupons

if( tep_session_is_registered( 'coupon' ) && is_object( $order->coupon ) ) {

$sql_data_array = array( 'coupons_id' => $order->coupon->coupon['coupons_id'],

'orders_id' => $insert_id );

tep_db_perform( TABLE_DISCOUNT_COUPONS_TO_ORDERS, $sql_data_array );

}

//end kgt - discount coupons

 

// initialized for the email confirmation

$products_ordered = '';

$subtotal = 0;

$total_tax = 0;

 

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

// Stock Update - Joao Correia

if (STOCK_LIMITED == 'true') {

if (DOWNLOAD_ENABLED == 'true') {

$stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename

FROM " . TABLE_PRODUCTS . " p

LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa

ON p.products_id=pa.products_id

LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad

ON pa.products_attributes_id=pad.products_attributes_id

WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'";

// Will work with only one option for downloadable products

// otherwise, we have to build the query dynamically with a loop

$products_attributes = $order->products[$i]['attributes'];

if (is_array($products_attributes)) {

$stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";

}

$stock_query = tep_db_query($stock_query_raw);

} else {

$stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

}

if (tep_db_num_rows($stock_query) > 0) {

$stock_values = tep_db_fetch_array($stock_query);

// do not decrement quantities if products_attributes_filename exists

if ((DOWNLOAD_ENABLED != 'true') || (!$stock_values['products_attributes_filename'])) {

$stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];

} else {

$stock_left = $stock_values['products_quantity'];

}

tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {

tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

}

}

}

 

// Update products_ordered (for bestsellers list)

tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

 

$sql_data_array = array('orders_id' => $insert_id,

'products_id' => tep_get_prid($order->products[$i]['id']),

'products_model' => $order->products[$i]['model'],

'products_name' => $order->products[$i]['name'],

'products_price' => $order->products[$i]['price'],

'final_price' => $order->products[$i]['final_price'],

'products_tax' => $order->products[$i]['tax'],

'products_quantity' => $order->products[$i]['qty']);

tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);

$order_products_id = tep_db_insert_id();

//begin add receipt//

tep_session_register('last_order');

$last_order = $insert_id;

$oID = $last_order;

//end add receipt//

 

//------insert customer choosen option to order--------

$attributes_exist = '0';

$products_ordered_attributes = '';

if (isset($order->products[$i]['attributes'])) {

$attributes_exist = '1';

for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

if (DOWNLOAD_ENABLED == 'true') {

$attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename

from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa

left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad

on pa.products_attributes_id=pad.products_attributes_id

where pa.products_id = '" . $order->products[$i]['id'] . "'

and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "'

and pa.options_id = popt.products_options_id

and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "'

and pa.options_values_id = poval.products_options_values_id

and popt.language_id = '" . $languages_id . "'

and poval.language_id = '" . $languages_id . "'";

$attributes = tep_db_query($attributes_query);

} else {

$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'");

}

$attributes_values = tep_db_fetch_array($attributes);

 

$sql_data_array = array('orders_id' => $insert_id,

'orders_products_id' => $order_products_id,

'products_options' => $attributes_values['products_options_name'],

'products_options_values' => $attributes_values['products_options_values_name'],

'options_values_price' => $attributes_values['options_values_price'],

'price_prefix' => $attributes_values['price_prefix']);

tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array);

 

if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) {

$sql_data_array = array('orders_id' => $insert_id,

'orders_products_id' => $order_products_id,

'orders_products_filename' => $attributes_values['products_attributes_filename'],

'download_maxdays' => $attributes_values['products_attributes_maxdays'],

'download_count' => $attributes_values['products_attributes_maxcount']);

tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);

}

$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];

}

}

//------insert customer choosen option eof ----

//BEGIN SEND HTML MAIL//

 

$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";

$products_quantity .= nl2br($order->products[$i]['qty'] . "\n");

$products_name .= nl2br("" . $order->products[$i]['name'] . $products_ordered_attributes ."\n");

 

if (!tep_not_null($order->products[$i]['model'])) {

$products_model .= ''.EMAIL_NO_MODEL.'' ;

}

else

$products_model .= nl2br($order->products[$i]['model'] . "\n");

 

 

$products_price .= nl2br($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty']) . "\n");

 

}

 

 

 

 

for ($i=0; $i<sizeof($order_totals); $i++) {

$Vartaxe .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";

}

 

 

if ($order->content_type != 'virtual') {

$Varaddress .= tep_address_label($customer_id, $sendto, 0, '', "\n") ;

}

 

if (is_object($$payment)) {

$Varmodepay .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .

EMAIL_SEPARATOR . "\n";

$payment_class = $$payment;

$Varmodpay .= $payment_class->title . "\n";

if ($payment_class->email_footer) {

$Varmodpay .= $payment_class->email_footer . "\n\n";

}

}

 

$Varlogo = ''.VARLOGO.'' ;

$Vartable1 = ''.VARTABLE1.'' ;

$Vartable2 = ''.VARTABLE2.'' ;

 

$Vartext1 = ' <b>' . EMAIL_TEXT_DEAR . ' ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] .' </b><br>' . EMAIL_MESSAGE_GREETING ;

$Vartext2 = ' ' . EMAIL_TEXT_ORDER_NUMBER . ' <STRONG> ' . $insert_id . '</STRONG><br>' . EMAIL_TEXT_DATE_ORDERED . ': <strong>' . strftime(DATE_FORMAT_LONG) . '</strong><br><a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'account_history_info.php?order_id=' . $insert_id .'">' . EMAIL_TEXT_INVOICE_URL . '</a>' ;

 

$Varmailfooter = ''.VARMAILFOOTER.'' ;

$VarArticles= ''.EMAIL_TEXT_PRODUCTS_ARTICLES.'' ;

$VarModele= ''.EMAIL_TEXT_PRODUCTS_MODELE.'' ;

$VarQte= ''.EMAIL_TEXT_PRODUCTS_QTY .'' ;

$VarTotal= ''.EMAIL_TEXT_TOTAL.'' ;

$VarAddresship = ''.EMAIL_TEXT_DELIVERY_ADDRESS.'' ;

$VarAddressbill = ''.EMAIL_TEXT_BILLING_ADDRESS.'' ;

$Varmetodpaye = ''.EMAIL_TEXT_PAYMENT_METHOD.'' ;

$Vardetail = ''.DETAIL .'' ;

$Varhttp = ''.VARHTTP.'';

$Varstyle = ''.VARSTYLE.'';

$Varshipaddress =''.tep_address_label($customer_id, $sendto).'';

$Varadpay = ''.tep_address_label($customer_id, $billto).'';

 

 

 

require(DIR_WS_MODULES . 'email/html_checkout_process.php');

$email_order = $html_email_order ;

 

// lets start with the email confirmation

if (EMAIL_USE_HTML == 'true') {

 

$email_order;

 

}

else

 

{

 

$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; $i<sizeof($order_totals); $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\n\n\n";

if ($payment_class->email_footer) {

$email_order .= $payment_class->email_footer . "\n\n";

}

}

 

$email_order .= "\n" . EMAIL_TEXT_FOOTER . "\n" .

HTTP_SERVER . DIR_WS_CATALOG . "\n" .

EMAIL_TEXT_FOOTERR . "\n" ;

 

}

 

 

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

$email_order=ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\">\</a>", $email_order);

 

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

$email_order = $html_email_order ;

if (EMAIL_USE_HTML == 'true') {

 

$email_order;

 

}

else

 

{

 

$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; $i<sizeof($order_totals); $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\n\n\n";

if ($payment_class->email_footer) {

$email_order .= $payment_class->email_footer . "\n\n";

}

}

 

$email_order .= "\n" . EMAIL_TEXT_FOOTER . "\n" .

HTTP_SERVER . DIR_WS_CATALOG . "\n" .

EMAIL_TEXT_FOOTERR . "\n" ;

 

}

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

$email_order=ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\">\</a>", $email_order);

}

 

//END SEND HTML MAIL//

 

 

// load the after_process function from the payment modules

$payment_modules->after_process();

 

$cart->reset(true);

 

// unregister session variables used during checkout

tep_session_unregister('sendto');

tep_session_unregister('billto');

tep_session_unregister('shipping');

tep_session_unregister('payment');

tep_session_unregister('comments');

//kgt - discount coupons

tep_session_unregister('coupon');

//end kgt - discount coupons

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

Link to comment
Share on other sites

Please post your html_checkout_process.php file also

 

 

Here it is:

 

<?php

$html_email_order = "<html>";

$html_email_order .= "<head>";

$html_email_order .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> ";

$html_email_order .= "$Varhttp ";

$html_email_order .= "$Varstyle ";

$html_email_order .= "</head>";

$html_email_order .= "<body>";

$html_email_order .= "<table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";

$html_email_order .= " <tr>";

$html_email_order .= " <td><table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";

$html_email_order .= " <tr> ";

$html_email_order .= " <td>$Vartable1";

$html_email_order .= " <tr> ";

$html_email_order .= " <td><font face=\"verdana, arial\" size=\"-1\">$Varlogo</font></td>";

$html_email_order .= " </tr>";

$html_email_order .= " </table></td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr> ";

$html_email_order .= " <td>$Vartable2 ";

$html_email_order .= " <tr> ";

$html_email_order .= " <td class=\"main\">$Vartext1</td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr height=\"12\" class=\"detail\"> ";

$html_email_order .= " <td height=\"12\"> </td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr class=\"detail\"> ";

$html_email_order .= " <td class=\"main\">$Vartext2</td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr height=\"12\"> ";

$html_email_order .= " <td height=\"12\"> </td>";

$html_email_order .= " </tr>";

$html_email_order .= " </table></td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr>";

$html_email_order .= " <td><table width=\"600\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=white>";

$html_email_order .= " <tr> ";

$html_email_order .= " <td class=\"boxmail\" align=\"center\" width=\"80\">Image</td>";

$html_email_order .= " <td class=\"boxmail\" align=\"left\" width=\"260\">$VarArticles</td>";

$html_email_order .= " <td class=\"boxmail\" align=\"left\" width=\"120\">$VarModele</td>";

$html_email_order .= " <td class=\"boxmail\" align=\"center\" width=\"40\">$VarQte</td>";

$html_email_order .= " <td class=\"boxmail\" align=\"right\" width=\"80\">$VarTotal</td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr> ";

$html_email_order .= " <td width=\"80\" valign=\"top\" align=\"center\" class=\"boxmailgris\">$products_images</td>";

$html_email_order .= " <td width=\"260\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$products_name</td>";

$html_email_order .= " <td width=\"120\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$products_model</td>";

$html_email_order .= " <td width=\"40\" valign=\"top\" align=\"center\" class=\"boxmailgris\">$products_quantity</td>";

$html_email_order .= " <td width=\"80\" valign=\"top\" align=\"right\" class=\"boxmailgris\">$products_price</td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr height=\"12\"> ";

$html_email_order .= " <td height=\"12\" width=\"300\" valign=\"top\" align=\"left\" class=\"tableur\">$Vardetail</td>";

$html_email_order .= " <td colspan=\"4\" width=\"300\" valign=\"top\" align=\"right\" class=\"tableur\">$Vartaxe</td>";

$html_email_order .= " </tr>";

$html_email_order .= " </table></td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr>";

$html_email_order .= " <td><table width=\"600\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=white>";

$html_email_order .= " <tr> ";

$html_email_order .= " <td width=\"300\" class=\"boxmail\">$VarAddresship</td>";

$html_email_order .= " <td width=\"300\" class=\"boxmail\">$VarAddressbill</td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr> ";

$html_email_order .= " <td width=\"300\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$Varshipaddress</td>";

$html_email_order .= " <td width=\"300\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$Varadpay</td> ";

$html_email_order .= " </tr>";

$html_email_order .= " </table></td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr>";

$html_email_order .= " <td><table width=\"600\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=white>";

$html_email_order .= " <tr> ";

$html_email_order .= " <td class=\"boxmail\">$Varmetodpaye</td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr> ";

$html_email_order .= " <td class=\"boxmailgris\">$Varmodpay</td> ";

$html_email_order .= " </tr>";

$html_email_order .= " </table></td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr>";

$html_email_order .= " <td><table width=\"600\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=white>";

$html_email_order .= " <tr height=\"12\"> ";

$html_email_order .= " <td height=\"12\"> </td>";

$html_email_order .= " </tr>";

$html_email_order .= " <tr class=\"main\"> ";

$html_email_order .= " <td class=\"footer\">$Varmailfooter</td> ";

$html_email_order .= " </tr>";

$html_email_order .= " </table></td>";

$html_email_order .= " </tr>";

$html_email_order .= "</table></td>";

$html_email_order .= "</tr>";

$html_email_order .= "</table>";

$html_email_order .= "</body>";

$html_email_order .= "</html>";

?>

 

 

 

Will appriciate any help with this one!!

Link to comment
Share on other sites

Which Version of send_html you are using - i´m a little bit confused ?!

 

If you are using the row_mod version and have worked out the instructions as described in the file

sendhtmlmail_row_mod_additions.txt your checkout process.php and html_checkout_process.php

should look different to the versions you have posted ?!

 

f.e.

 

$html_email_order .= " <td width=\"80\" valign=\"top\" align=\"center\" class=\"boxmailgris\">$products_images</td>";
$html_email_order .= " <td width=\"260\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$products_name</td>";
$html_email_order .= " <td width=\"120\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$products_model</td>";
$html_email_order .= " <td width=\"40\" valign=\"top\" align=\"center\" class=\"boxmailgris\">$products_quantity</td>";
$html_email_order .= " <td width=\"80\" valign=\"top\" align=\"right\" class=\"boxmailgris\">$products_price</td>";

 

should similar to something like (ONLY IF YOU ARE USING THE ROWMOD)

 

$m=0;
foreach ($orderarray as $Orderpos){
$modmodel = $Orderpos['Model'];
$modpart = $Orderpos['Modelnr'];
$modqty = $Orderpos['Qty'];
$modtotal = $Orderpos['Price'];
$modimage = $Orderpos['Image'];
$html_email_order .= "		  <tr><td width=\"80\" valign=\"middle\" align=\"center\" class=\"boxmailgris".$m."\">$modimage</td>";
$html_email_order .= "		  <td width=\"260\" valign=\"top\" align=\"left\" class=\"boxmailgris".$m."\">$modmodel</td>";
$html_email_order .= "			<td width=\"120\" valign=\"top\" align=\"left\"  class=\"boxmailgris".$m."\">$modpart</td>";
$html_email_order .= "			<td width=\"40\"  valign=\"top\" align=\"center\" class=\"boxmailgris".$m."\">$modqty</td>";
$html_email_order .= "			<td width=\"80\" valign=\"top\" align=\"right\" class=\"boxmailgris".$m."\">$modtotal</td></tr>";
$m = $m+1;
if ($m == 2)$m=0;
};

 

 

Also your checkout_process.php have to be modified for your personal needs.

 

f.e.

 

if (!tep_not_null($order->products[$i]['model'])) {
$products_model .= ''.EMAIL_NO_MODEL.'';
}
else
$products_model .= nl2br($order->products[$i]['model'] . "\n");


$products_price .= nl2br($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty']) . "\n");

 

should be look similar to (ONLY IF YOU ARE USING ROWMOD)

 

	if (!tep_not_null($order->products[$i]['model'])) {
   $products_model .= ''.EMAIL_NO_MODEL.'';
	 }
else{
   $products_model .= nl2br($order->products[$i]['model'] . "\n");
	}; 

	$orderarray[$i] = array("Image" => "<img src=".HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $orders_picture['products_image']." width='90px' border='0'>",
					 "Model" => nl2br("" . $order->products[$i]['name'] . $products_ordered_attributes . "\n" ),
					 "Modelnr"=> nl2br($order->products[$i]['model'] . "\n"),
					 "Qty" => nl2br($order->products[$i]['qty'] . "\n"),
					 "Price" => nl2br($currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty'])  . "\n");

 

 

The problem is, that you have defined variables like $products_image in html_checkout_process.php but didn´t overhand them to the html_checkout file.

 

So please be aware that you have installed the contribution the right way.

It may be a little bit confusing that the supported php files in the contribution zip file are not

have included the whole set of changes. The reason for that is, that every user have different

needs for their html email and the row_mod_text file shows them ways to handle them the right way.

 

Sorry for my bad english - i´m not a native speaker ;)

 

Hope that will help you

 

br Frank

Link to comment
Share on other sites

Ok I got the next problem.

 

When I order 4 products and get the email.

 

The email shows all 4 products with there information in 1 Row! instead of each product his own row.

 

and here the html_checkout_process code

 

$html_email_order .= "          	<td align=\"center\" width=\"40\" bgcolor=#CDC0B0>$VarQte</td>";
$html_email_order .= "          	<td align=\"right\" width=\"80\" bgcolor=#CDC0B0>$VarTotal</td>";
$html_email_order .= "        	</tr>";
[u][b]$html_email_order .= "        	<tr> ";[/b][/u]
$m=0;
foreach ($orderarray as $Orderpos){
$products_images = $Orderpos['Image'];
$products_name = $Orderpos['Modelnr'];
$manufacturers_name = $Orderpos['Color'];
$products_quantity = $Orderpos['Qty'];
$products_price = $Orderpos['Price'];
$html_email_order .= "          	<td width=\"80\" valign=\"top\" align=\"center\" class=\"boxmailgris\">$products_images</td>";
$html_email_order .= "          	<td width=\"260\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$products_name</td>";
$html_email_order .= "          	<td width=\"140\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$manufacturers_name</td>";
$html_email_order .= "          	<td width=\"40\"  valign=\"top\" align=\"center\" class=\"boxmailgris\">$products_quantity</td>";
$html_email_order .= "          	<td width=\"80\" valign=\"top\" align=\"right\" class=\"boxmailgris\">$products_price</td>";
$m = $m+1;
if ($m == 2)$m=0;
};
[u][b]$html_email_order .= "        	</tr>";	[/b][/u]
$html_email_order .= "        	<tr height=\"14\"> ";
$html_email_order .= "          	<td height=\"14\" width=\"300\" valign=\"top\" align=\"left\" class=\"tableur\">$Vardetail</td>";
$html_email_order .= "          	<td colspan=\"4\" width=\"300\" valign=\"top\" align=\"right\" class=\"tableur\">$Vartaxe</td>";
$html_email_order .= "        	</tr>";

 

How can I get the products in the email beneath each other?

 

The upper bold and underlined lines have to be removed and you have to add an opening tr at the first and an closing tr at the last line

of article-sets which are build in the foreach sentences

 

$products_price = $Orderpos['Price'];
$html_email_order .= "			  [u][b]<tr> [/b] [/u]<td width=\"80\" valign=\"top\" align=\"center\" class=\"boxmailgris\">$products_images</td>";
$html_email_order .= "			  <td width=\"260\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$products_name</td>";
$html_email_order .= "			  <td width=\"140\" valign=\"top\" align=\"left\" class=\"boxmailgris\">$manufacturers_name</td>";
$html_email_order .= "			  <td width=\"40\"  valign=\"top\" align=\"center\" class=\"boxmailgris\">$products_quantity</td>";
$html_email_order .= "			  <td width=\"80\" valign=\"top\" align=\"right\" class=\"boxmailgris\">$products_price</td> [u][b]</tr>[/b][/u]  ";
$m = $m+1;
if ($m == 2)$m=0;

 

if you would like to change the textcolor or the background color than you have to find the boxmailgris class in the stylesheetmail.css

and change it their instead of modifying the php file themself

Edited by shetani
Link to comment
Share on other sites

It is a great contrib indeed!!

 

I'm wondering, is there a way to remove the blank lines that exist in the address info and total amounts?

I'dd like to get the result that the addresses are displayed with just one linebreak and not two.

 

Is it possible?

Link to comment
Share on other sites

Hi,

 

This contrib seems to work great, but I have the same problem with this one as I had with others: when I include images, eg. the shop logo, these images are blocked by most e-mail clients because they don't autmatically allow remote images to be displayed.

Is there a way to solve this? Could it be possible to add the image to the e-mail message, so it isn't a remote image?

 

Any thoughts are welcome!

 

/Jasper

Link to comment
Share on other sites

  • 3 weeks later...

GREAT CONTRIB....i installed this contrib, everything OK except my billing address..why did't show in my order process...there's anything wrong with my checkout process.PHP or others...because before I installed it and used standard orderprocess..it's okey...

 

 

please help me please...because I have to use this Great contibution...

 

sorry for my bad english...

 

warmest regards from indonesia...

Link to comment
Share on other sites

GREAT CONTRIB....i installed this contrib, everything OK except my billing address..why did't show in my order process...there's anything wrong with my checkout process.PHP or others...because before I installed it and used standard orderprocess..it's okey...

please help me please...because I have to use this Great contibution...

 

sorry for my bad english...

 

warmest regards from indonesia...

 

$Varadpay
is not defined, you need to define it simmilar to
$Varshipaddress
Link to comment
Share on other sites

  • 1 month later...

Hi

 

I might install this contribution as it looks great although have a few questions...

 

1) Is anyone using this with the PayPal IPN Module Contribution, im worried that when modifying the checkout_process.php I will damage the PayPal module and it will stop working. Has anyone successfully integrated the two, or will this contribution have no effect on the PayPal module?

 

2) Has anyone solved the problem formmailer posted:

when I include images, eg. the shop logo, these images are blocked by most e-mail clients because they don't autmatically allow remote images to be displayed.

Is there a way to solve this? Could it be possible to add the image to the e-mail message, so it isn't a remote image?

 

3) Should I change the code according to the "row_mod_additions" file - why exactly are these needed?

 

 

Thanks :)

Edited by Benjjj6
Link to comment
Share on other sites

Hi

 

I might install this contribution as it looks great although have a few questions...

 

1) Is anyone using this with the PayPal IPN Module Contribution, im worried that when modifying the checkout_process.php I will damage the PayPal module and it will stop working. Has anyone successfully integrated the two, or will this contribution have no effect on the PayPal module?

 

2) Has anyone solved the problem formmailer posted:

 

 

3) Should I change the code according to the "row_mod_additions" file - why exactly are these needed?

 

 

Thanks :)

1 Depends on your editing skills.

2 How can that be solved?

3 Only if you want to.

Link to comment
Share on other sites

Leslie,

 

Is it possible for you to write a quick guide, or give me some pointers on how to edit checkout_process.php whilst still maintaining the functuionality of the PayPal IPN module?

 

Thanks for youe help :)

Link to comment
Share on other sites

Leslie,

 

Is it possible for you to write a quick guide, or give me some pointers on how to edit checkout_process.php whilst still maintaining the functuionality of the PayPal IPN module?

 

Thanks for youe help :)

 

 

Think about the edits you make before you make them, and back up all files before you begin editing.

 

You should have osc set up on your pc under wamp or xamp and trial your edits there before uploading.

Link to comment
Share on other sites

I do have my store set up under xampp on my PC although I cant tell if PayPal will process payments correctly as I get the following error when I go to PayPal's site

 

This invoice has already been paid. For more information, please contact the merchant.
Link to comment
Share on other sites

I went through and set up a sandbox account and used PayPals sandbox server to process the payment after I had installed this contribution on my test site. It was all going ok as I was paying through the sandbox server but then when I got to the point of actually clicking pay, PayPal told me:

 

This invoice has already been paid. For more information, please contact the merchant.

 

obviously, no email was sent to me as I didnt finish the checkout process, so I dont know if what I installed works or how it looks. What would you recommend me doing next Leslie? Im a little lost

Link to comment
Share on other sites

I went through and set up a sandbox account and used PayPals sandbox server to process the payment after I had installed this contribution on my test site. It was all going ok as I was paying through the sandbox server but then when I got to the point of actually clicking pay, PayPal told me:

 

 

 

obviously, no email was sent to me as I didnt finish the checkout process, so I dont know if what I installed works or how it looks. What would you recommend me doing next Leslie? Im a little lost

You need to troubleshoot this error.

Link to comment
Share on other sites

Hi

 

Is it possible to make this invoice from this contribution, which is emailed to the customer, also be called upon when the admin clicks 'Invoice' from the orders panel in Admin?

 

Thanks!

Probably can be, but I don't know how.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...