Jump to content
Olof Larsson

[Contribution] U HTML Emails

Recommended Posts

J,

Good sources are:

http://www.mailchimp.com/resources/templates/

-> 'download all the templates in one .ZIP file '

 

These articles helped me a lot:

http://www.campaignmonitor.com/design-guidelines/

http://reachcustomersonline.com/2004/11/11/09.27.00/

 

 

Mixit,

 

Thanks for those links, they were very helpful and i've already began work on my own template. Also, I figured out how to use the insert the variables from the checkout_process.php in the catalog folder so that it displays the information I want to send. Unfortunately, I still can't figure out why its still sending the plain text stuff at the start of the email (similar to the screenshot I had posted earlier.) Any idea where this might be? I'm starting to think I may need to go through with CompareIt and look at the files included with the contribution and the files I have on the site now to make sure i didn't miss anything, but figured I may as well ask to see if you might know why it's dragging in the plain text at the top. Also, do you know where the plain text that is at the top of the emails would be coming from (like which file in the stock osCommerce)? I think my backup plan if I can't figure out why its tossing it up there is to just delete the plain text that's being displayed (this way, it wouldn't matter if it was included with the email, because it would just be white space =) )

 

Thanks again,

 

J

Share this post


Link to post
Share on other sites
Unfortunately, I still can't figure out why its still sending the plain text stuff at the start of the email (similar to the screenshot I had posted earlier.) Any idea where this might be? I'm starting to think I may need to go through with CompareIt and look at the files included with the contribution and the files I have on the site now to make sure i didn't miss anything, but figured I may as well ask to see if you might know why it's dragging in the plain text at the top.

 

Also, do you know where the plain text that is at the top of the emails would be coming from (like which file in the stock osCommerce)? I think my backup plan if I can't figure out why its tossing it up there is to just delete the plain text that's being displayed (this way, it wouldn't matter if it was included with the email, because it would just be white space =) )

J,

 

Try to read your osC mail in different e-mail readers (if possible) and also within a few webmail readers (like web2mail.com, AOL and gmail) to see if it is caused by your reader.

Does the other mails (eg new account and order) do the same?

If it is not the reader and other mails do work, I suppose the code did not get into your pages as intended.

 

The plain text is translated by U HTML from the HTML-text to plain text and this is (in my opinion) not a preffered behavior because it is assembled into one line of text.

See my additional postings in this forum and on the addon-page if you would like to know more and you can use it if you would like to make your own plain text layout.

 

Patrick

Share this post


Link to post
Share on other sites
J,

 

Try to read your osC mail in different e-mail readers (if possible) and also within a few webmail readers (like web2mail.com, AOL and gmail) to see if it is caused by your reader.

Does the other mails (eg new account and order) do the same?

If it is not the reader and other mails do work, I suppose the code did not get into your pages as intended.

 

The plain text is translated by U HTML from the HTML-text to plain text and this is (in my opinion) not a preffered behavior because it is assembled into one line of text.

See my additional postings in this forum and on the addon-page if you would like to know more and you can use it if you would like to make your own plain text layout.

 

Patrick

 

 

Patrick,

 

I've tried making my own templates and everything, but I still get errors in it (including all the plain text stuff at the top like in the image I posted.) I also found these links:

http://forums.oscommerce.com/lofiversion/i...hp?t243749.html

http://www.ez-oscommerce.com/oscommerce-su...hp-t180776.html

Which seemed pretty similar to the problem I was having, but my host didn't really help much. The only thing they suggested was to use an ini_set which (by referencing the above forum info) I tried to do in both catalog/includes/configure.php and catalog/admin/includes/configure.php. This didn't bring me any success so figure you might be able to point me in the right direction. The more I look at that above post, however, the more I feel like the reason why the templates aren't working is because of those 'emeregency' characters they are talking about. Any further recommendations? Thanks a bunch for all the help by the way, I really appreciate it. I would love to use this contribution because it looks very professional and visually appealing, but I'm starting to considering getting rid of it and starting with something new =(

 

J

Edited by therealjblizzle

Share this post


Link to post
Share on other sites

Hi,

 

Does anyone can tell me how i get a subject on top of the order e-mail?

Right now I don't have a subject at all.

 

When I disable UHTML I do have a subject in the e-mails.

 

Below is the code from the checkout_process.php file.

 

Any help on this fantastic contribution from Olof is appreciated!

 

<?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 (c) 2003 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')) {
// FS - 'First order than payment' - START
  //$navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));
  $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT, 'get' => $HTTP_GET_VARS, 'post' => $HTTP_POST_VARS));
// FS - 'First order than payment' - STOP
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

// FS - 'First order than payment' - START 
// execute only when no parameters set, or when part=1 (when part=2 order is already created) 
if ((!isset($HTTP_GET_VARS['part'])) or ((isset($HTTP_GET_VARS['part'])) and ($HTTP_GET_VARS['part'] == 1))) {
// FS - 'First order than payment' - STOP

 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'));
}
 }

// FS - 'First order than payment' - START
}
// FS - 'First order than payment' - STOP

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

// FS - 'First order than payment' - START
// execute only when no parameters set, or when part=1 (when part=2 order is already created)
if ((!isset($HTTP_GET_VARS['part'])) or ((isset($HTTP_GET_VARS['part'])) and ($HTTP_GET_VARS['part'] == 1))) {
// FS - 'First order than payment' - STOP

// 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;

// load the before_process function from the payment modules
 $payment_modules->before_process();

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->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);

// 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();

//------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 ----
$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

//---  Beginning of addition: Ultimate HTML Emails  ---//
if (EMAIL_USE_HTML == 'true') {
require(DIR_WS_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/checkout_process.php');
$email_order = $html_email;
}else{//Send text email
//---  End of addition: Ultimate HTML Emails  ---//

 $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";
}
 }
$new_mail_subject = EMAIL_TEXT_SUBJECT . ' - ' . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id;

//---  Beginning of addition: Ultimate HTML Emails  ---//
}

if(ULTIMATE_HTML_EMAIL_DEVELOPMENT_MODE === 'true'){
//Save the contents of the generated html email to the harddrive in .htm file. This can be practical when developing a new layout.
$TheFileName = 'Last_mail_from_checkout_process.php.htm';
$TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file");
fwrite($TheFileHandle, $email_order);
fclose($TheFileHandle);
}
//---  End of addition: Ultimate HTML Emails  ---//

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

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, $new_mail_subject, $email_order, $order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address']);
 }

// 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');

// FS - 'First order than payment' - START
} 

if ((isset($HTTP_GET_VARS['part'])) and ($HTTP_GET_VARS['part'] == 1)) {
 switch ($HTTP_GET_VARS['method']) {
  case 'iDealLite':
  // add the ordernumber to the payment 
	$payment_class->order_id = $insert_id; 
	break;	 	
 }
}

if ((!isset($HTTP_GET_VARS['part'])) or ((isset($HTTP_GET_VARS['part'])) and ($HTTP_GET_VARS['part'] == 2))) {
// FS - 'First order than payment' - STOP
 tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
// FS - 'First order than payment' - START
}
// FS - 'First order than payment' - STOP

 require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
<!-- FS - 'First order than payment' - START -->
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function autosubmit(formname) {
document.forms[formname].submit();
}
//--></script>   
</head>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center" class="pageHeading"><?php echo WAIT_TEXT_REDIRECT; ?></td>
 </tr>
</table>
<?php 
if ((isset($HTTP_GET_VARS['part'])) and ($HTTP_GET_VARS['part'] == 1) and ($HTTP_GET_VARS['method'] == 'iDealLite')) {
 $form_action_url = MODULE_PAYMENT_IDEAL_LITE_REDIRECT;
 echo tep_draw_form('checkout_process', $form_action_url, 'post');

 if (is_array($payment_modules->modules)) { // hashkey will be calculated included order_id 
echo $payment_modules->process_button();
 }

 echo tep_image_submit('pixel_trans.gif') . '</form>' . "\n"; 
?>
<script language="javascript"><!--
autosubmit('checkout_process');
//--></script>   
<?php
}
?>
<!-- FS - 'First order than payment' - STOP -->

 

Thanks for your help on this!

Edited by thiemd1

Share this post


Link to post
Share on other sites
How can I add c v2.1 in admin/mail.php?

 

Hey DuFF1,

 

If you just want to send html emails with, or without this contribution you need to do 2 things.

 

1.) In the Administration area under Configuration, go to E-Mail Options, edit "Use MIME HTML When Sending Emails" to TRUE.

 

 

2.) Open admin/mail.php - around line 42 look for:

 

$mimemessage->add_text($message);

 

 

Replace it with:

 

if (EMAIL_USE_HTML == 'true') {//Send html email

$mimemessage->add_html($message);

}else{//Send text email

$mimemessage->add_text($message);

}

 

Save it and you're good to go.

 

Then in your message you would use html tags in your message, i.e. <img src="http://www.example.com/myImage.jpg" />, <b>some bold text</b>

Share this post


Link to post
Share on other sites

Nice contribution....but...

 

Does anyone have a working solution to using this with Paypal Standard? From what I saw on this forum, the last questions by Omnigag were never answered.

 

Any help would be great.

 

Thanks,

zOnk

Share this post


Link to post
Share on other sites

Great contrib !!!!!!

 

I've installed the contrib according to the manual included. I only made some translations in the several php files.

My problem is that the customer and myself (store) receive the order confirmation email twice ...

 

Anyone an idea ?

 

Thanks,

Erwin

Share this post


Link to post
Share on other sites

Hello Olof,

 

Thank you for the nice Ultimate emails

 

How can i integrate in de statusupdate mail the track & trace number (I use contribution 3736)

Share this post


Link to post
Share on other sites

Olof,

 

First of all I'd like to thank you for a very neat and easy to install contribution.

 

I only have one question. I have customised the email as much as I can but I am hoping you or someone else can help. I am wanting to include an image of the product the customer purchased in the order confirmation email ... is this possible ? If so, is it relatively easy to do ?

 

Many thanks

 

John K

Share this post


Link to post
Share on other sites

You could add a query after

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

 

like:

 

$image_query = "SELECT products_image from " . TABLE_PRODUCTS . " where products_id = ". $order->products[$i]['id']. ""; 
		  $image_result = mysql_query($image_query)
or die(mysql_error()); 
$image = mysql_fetch_array($image_result);

 

then call it along with the rest of the products with for example...

 

<img src="' . HTTP_SERVER . '' . HTTP_CATALOG_SERVER . '' . DIR_WS_IMAGES. '' . $image['products_image'] . '" height="50" width="50" border="0"/>

 

Let me know if it works, remember to add a header title for the image.

Edited by Jonojamesmac

Share this post


Link to post
Share on other sites

Hello,

I've tried to install this contribution several time but the e-mail always shows like this:

 

--=_9db5d21caacea3dcee2b484a5a7da4b2 Content-Type: text/plain; charset="iso-1040" Content-Transfer-Encoding: 7bit (xxxxxxx) Content-Type: text/html; charset="iso-1040" Content-Transfer-Encoding: quoted-printable (XXXXXXXXXX)

(xxxxxxxxx)

 

(xxxxxxx)

 

 

the (xxxx) are the text

 

what could be the problem?

thank you

Share this post


Link to post
Share on other sites

I tried again:

 

--=_b571227069dbd6015b7c6bb9b5ba84e1 Content-Type: text/plain; charset="iso-1040" Content-Transfer-Encoding: 7bit Gentil Filippo Spacca,Lo stato del suo ordine è stato modificato.Nuovo Stato: In processoI nostri commenti:1Z92230V6840331454 Numero Ordine: 7 Data Ordine: lunedì 27 aprile, 2009 Dattagli Fattura: http://www.hwpoint.com/account_history_info.php?order_id=7 --=_b571227069dbd6015b7c6bb9b5ba84e1 Content-Type: text/html; charset="iso-1040" Content-Transfer-Encoding: quoted-printable Gentil Filipp= o Spacca,
Lo stato del suo ordine =E8 stato modificato.

Nuovo Stato: In processo

I nostri comm= enti:
1Z92230V6840331454

=  = Numero Ordine:  7 
=  = Data Ordine:  luned=EC 27 aprile, 2009 
Dattagli Fattura:  http= ://www.hwpoint.com/account_history_info.php?order_id=3D7 <= /tr> 

--=_b571227069dbd6015b7c6bb9b5ba84e1--

 

this is the mail that arrives

Share this post


Link to post
Share on other sites

I love the look of this contribution, and the templates seem pretty easy to edit even for me a designer not a programmer. My one question is though, is this contribution register globals compatible?

 

Thank you in advance for your time and consideration.

Share this post


Link to post
Share on other sites

I think an update should be made to this, I made this snazzy change to how it works so as to not have to create a text-formatted email to accompany the HTML one.

 

...this bit changes from file to file, but it goes right before the tep_mail... function and replaces the other bits above it (for this contrib, that is)

 

//---  Beginning of addition: Ultimate HTML Emails  (modified by diZzyCoDeR 05/02/09 -=[http://blog.atgnaat.net]=---//
if (EMAIL_USE_HTML == 'true') {
require(DIR_FS_CATALOG_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/orders.php');

$UHTML_html_text = $email;  // this sets our default text email to what has been already figured out above by default
$email = $html_email;  // now set the main text to be the HTML that was just created by UHE

//Save the contents of the generated html email to the harddrive in .htm file. This can be practical when developing a new layout.
if(ULTIMATE_HTML_EMAIL_DEVELOPMENT_MODE === 'true'){
	$TheFileName = DIR_FS_CATALOG . 'Last_mail_from_FILENAME.php.htm';
	$TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file");
	fwrite($TheFileHandle, $email);
	fclose($TheFileHandle);
}
}
//---  End of addition: Ultimate HTML Emails  ---//

 

This works for me, as I said, you'll need to modify the implementation of your contrib to match this logic -- if you're not a programmer, just stick to the releases until this makes it in.

Share this post


Link to post
Share on other sites

Has anyone even after installing this mod along with Package Tracking Plus got it to work?

 

I get this error message:

 

Parse error: syntax error, unexpected T_IF in /xxx/xxxx/public_html/checkout_process.php on line 299

 

Pretty sure its because trying to merge with Package tracking. Below is the code for that area:

 

/* // lets start with the email confirmation

$email_order = STORE_NAME . "\n" . **/

//Package Tracking Plus BEGIN

// lets start with the email confirmation

$email_order = EMAIL_TEXT_GREETING . "\n" .

EMAIL_SEPARATOR . "\n" .

STORE_NAME . EMAIL_INVOICE . "\n" .

//Package Tracking Plus END

//--- Beginning of addition: Ultimate HTML Emails ---//

if (EMAIL_USE_HTML == 'true') (

require(DIR_WS_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/checkout_process.php');

$email_order = $html_email;

}else{//Send text email

//--- End of addition: Ultimate HTML Emails ---//

 

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" . */

//Package Tracking Plus BEGIN

(($order->customer['is_dummy_account'])? '' : EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL') . "'>" . 'order_id=' . $insert_id . "</a>\n") .

//Package Tracking Plus END

 

 

I will put store back to as before till I hear something.

 

Thank you.

Share this post


Link to post
Share on other sites
Hi

i did install this contribute ....

 

But when i want to switch pr change the default ( basic ) i see this error :

 

Fatal error: Call to undefined function tep_cfg_pull_down_uhtml_email_layout_list() in

/webwinkel/iadmin/configuration.php(125) : eval()'d code on line 1

Someone knows what can be wrong or what did i wrong ?

i did install everything as in the manual , checked all the files

 

hope someone knows the sollution

 

bye all mandy

 

Hi There,

I've got the same problem and dont know which file to fix it in!?

Please help!

Share this post


Link to post
Share on other sites

Hi there,

two weeks ago i installed your constrib on my Developingserver on a new installed oscommerce. The constrib worked very well. So i installed it on my Liveserver with many other constribs.

The only constrib, uhtml interferes is PDF-Attachment (Click).

I merged all files and changed the both settings "Use MIME HTML When Sending Emails" and "Development mode" to true and then I registered a new User.

In the catalogfolder is now a file called 'Last_mail_from_create_account.php.htm' that looks very nice but the Mailcontent is a mess withour linebreaks.

 

For example:

Test GmbH Sehr geehrter Herr TEST,willkommen zu Test GmbH.Sie können jetzt unseren Online-Service nutzen. Der Service bietet unter anderem:Kundenwarenkorb - Jeder Artikel bleibt registriert bis Sie zur Kasse gehen, oder die Produkte aus dem Warenkorb entfernen.Adressbuch - Wir können jetzt die Produkte zu der von Ihnen ausgesuchten Adresse senden. Der perfekte Weg ein Geburtstagsgeschenk zu versenden.Vorherige Bestellungen - Sie können jederzeit Ihre vorherigen Bestellungen überprüfen.Meinungen über Produkte - Teilen Sie Ihre Meinung zu unseren Produkten mit anderen Kunden.Falls Sie Fragen zu unserem Kunden-Service haben, wenden Sie sich bitte an den Vertrieb: info@test.de.Achtung: Diese eMail-Adresse wurde uns von einem Kunden bekannt gegeben. Falls Sie sich nicht angemeldet haben, senden Sie bitte eine eMail an info@test.de.

 

If I set the uhtml-configuration to false the mailcontent (text/plain) looks fine.

 

Whats wrong?!

 

tep_mail from catalog/includes/functions/general.php

  function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
if (SEND_EMAILS != 'true') return false;

// Instantiate a new mail object
$message = new email(array('X-Mailer: osCommerce Mailer'));

// Build the text version
$text = strip_tags($email_text);
if (EMAIL_USE_HTML == 'true') {
  $message->add_html($email_text, $text);
} else {
  $message->add_text($text);
}

// Send message
$message->build_message();
$message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
 }

 

tep_mail_attach from catalog/includes/functions/general.php

function tep_mail_attach($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $attachmentArray)
{
 if (SEND_EMAILS != 'true') return false;
 // Instantiate a new mail object
 $message = new email(array('X-Mailer: osCommerce Mailer'));
 // Build the text version
 $text = strip_tags($email_text);
 if (EMAIL_USE_HTML == 'true')
 {
$message->add_text($text);
 }
 else
 {
$message->add_text($text);
 }

 foreach($attachmentArray as $key => $value)
 {
$attachment = fread(fopen($key, "r"), filesize($key));
$pos = strrpos($key,"/");
if($pos !== false)
{
  $name = substr($key,$pos+1);
}
$message->add_attachment($attachment, $name, $value);
 }

 

catalog/create_account.php

<?php
/*
 $Id: create_account.php,v 1.1.1.1 2009/01/15 09:24:32 deepa Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');



// needs to be included earlier to set the success message in the messageStack
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

 $process = false;
 if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
$process = true;

if (ACCOUNT_GENDER == 'true') {
  if (isset($HTTP_POST_VARS['gender'])) {
	$gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
  } else {
	$gender = false;
  }
}
$firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);
$lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($HTTP_POST_VARS['company']);
$street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']);
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($HTTP_POST_VARS['suburb']);
$postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);
$city = tep_db_prepare_input($HTTP_POST_VARS['city']);
if (ACCOUNT_STATE == 'true') {
  $state = tep_db_prepare_input($HTTP_POST_VARS['state']);
  if (isset($HTTP_POST_VARS['zone_id'])) {
	$zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);
  } else {
	$zone_id = false;
  }
}
#echo "land:".$HTTP_POST_VARS['country'];
$country = tep_db_prepare_input($HTTP_POST_VARS['country']);
$telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']);
$fax = tep_db_prepare_input($HTTP_POST_VARS['fax']);
if (isset($HTTP_POST_VARS['newsletter'])) {
  $newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']);
} else {
  $newsletter = false;
}
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
$confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

$error = false;

//-----   BEGINNING OF ADDITION: MATC   -----//
if (tep_db_prepare_input($HTTP_POST_VARS['TermsAgree']) != 'true' and MATC_AT_REGISTER != 'false') {
	$error = true;
	$messageStack->add('create_account', MATC_ERROR);
}
//-----   END OF ADDITION: MATC   -----//

if (ACCOUNT_GENDER == 'true') {
  if ( ($gender != 'm') && ($gender != 'f') ) {
	$error = true;

	$messageStack->add('create_account', ENTRY_GENDER_ERROR);
  }
}

if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR);
}

if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_LAST_NAME_ERROR);
}

if (ACCOUNT_DOB == 'true') {
  if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {
	$error = true;

	$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);
  }
}

if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);
} elseif (tep_validate_email($email_address) == false) {
  $error = true;

  $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
} else {
  $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
  $check_email = tep_db_fetch_array($check_email_query);
  if ($check_email['total'] > 0) {
	$error = true;

	$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
  }
}

if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_STREET_ADDRESS_ERROR);
}

if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_POST_CODE_ERROR);
}

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_CITY_ERROR);
}

if (is_numeric($country) == false) {
  $error = true;

  $messageStack->add('create_account', ENTRY_COUNTRY_ERROR);
}

if (ACCOUNT_STATE == 'true') {
  $zone_id = 0;
  $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'");
  $check = tep_db_fetch_array($check_query);
  $entry_state_has_zones = ($check['total'] > 0);
  if ($entry_state_has_zones == true) {
	$zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name = '" . tep_db_input($state) . "' or zone_code = '" . tep_db_input($state) . "')");
	if (tep_db_num_rows($zone_query) == 1) {
	  $zone = tep_db_fetch_array($zone_query);
	  $zone_id = $zone['zone_id'];
	} else {
	  $error = true;

	  $messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT);
	}
  } else {
	if (strlen($state) < ENTRY_STATE_MIN_LENGTH) {
	  $error = true;

	  $messageStack->add('create_account', ENTRY_STATE_ERROR);
	}
  }
}

if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
}


if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
  $error = true;

  $messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
} elseif ($password != $confirmation) {
  $error = true;

  $messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
}

if ($error == false) {
  $sql_data_array = array('customers_firstname' => $firstname,
						  'customers_lastname' => $lastname,
						  'customers_email_address' => $email_address,
						  'customers_telephone' => $telephone,
						  'customers_fax' => $fax,
						  'customers_newsletter' => $newsletter,
						  'customers_password' => tep_encrypt_password($password));

  if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;
  if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

  tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

  $customer_id = tep_db_insert_id();

  $sql_data_array = array('customers_id' => $customer_id,
						  'entry_firstname' => $firstname,
						  'entry_lastname' => $lastname,
						  'entry_street_address' => $street_address,
						  'entry_postcode' => $postcode,
						  'entry_city' => $city,
						  'entry_country_id' => $country);

  if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
  if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;
  if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
  if (ACCOUNT_STATE == 'true') {
	if ($zone_id > 0) {
	  $sql_data_array['entry_zone_id'] = $zone_id;
	  $sql_data_array['entry_state'] = '';
	} else {
	  $sql_data_array['entry_zone_id'] = '0';
	  $sql_data_array['entry_state'] = $state;
	}
  }

  tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

  $address_id = tep_db_insert_id();

  tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

  tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

  if (SESSION_RECREATE == 'True') {
	tep_session_recreate();
  }

  $customer_first_name = $firstname;
  $customer_default_address_id = $address_id;
  $customer_country_id = $country;
  $customer_zone_id = $zone_id;
  tep_session_register('customer_id');
  tep_session_register('customer_first_name');
  tep_session_register('customer_default_address_id');
  tep_session_register('customer_country_id');
  tep_session_register('customer_zone_id');

// restore cart contents
  $cart->restore_contents();

// build the message content
//---  Beginning of addition: Ultimate HTML Emails  ---//
if (EMAIL_USE_HTML == 'true') {
require(DIR_WS_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/create_account.php');
$email_text = $html_email;
}else{
//---  End of addition: Ultimate HTML Emails  ---//
  $name = $firstname . ' ' . $lastname;

  if (ACCOUNT_GENDER == 'true') {
	 if ($gender == 'm') {
	   $email_text = sprintf(EMAIL_GREET_MR, $lastname);
	 } else {
	   $email_text = sprintf(EMAIL_GREET_MS, $lastname);
	 }
  } else {
	$email_text = sprintf(EMAIL_GREET_NONE, $firstname);
  }

  $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
//---  Beginning of addition: Ultimate HTML Emails  ---//
}

if(ULTIMATE_HTML_EMAIL_DEVELOPMENT_MODE === 'true'){
//Save the contents of the generated html email to the harddrive in .htm file. This can be practical when developing a new layout.
$TheFileName = 'Last_mail_from_create_account.php.htm';
$TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file");
fwrite($TheFileHandle, $email_text);
fclose($TheFileHandle);
}
//---  End of addition: Ultimate HTML Emails  ---//
  $attachmentArray = array();
  $attachmentArray["documents/agb.pdf"] = "application/pdf";
  tep_mail_attach($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $attachmentArray);
  tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
}
 }

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

//BOF include the meta headers
require(DIR_WS_INCLUDES . 'header_frame.php');
//EOF include the meta headers
?>


 <?php require('includes/form_check.js.php'); ?>
 </head>
 <body>

 <div id="wrapper">

<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

  <div style="position:relative;">

<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->

<!-- body //-->
 <div id="bodycontent">
 <?php require(DIR_WS_INCLUDES . 'header_login.php');?>
<table>
 <tr>
  <td>
			<?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?>

			<table border="0" width="95%" cellspacing="0" cellpadding="0" class="content">
			  <tr>
				<td>
				  <table border="0" width="100%" cellspacing="0" cellpadding="0">
					<tr>
					  <td class="pageHeading"><h1><?php echo HEADING_TITLE; ?></h1></td>
					  <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_PAGE . 'create_account.png', HEADING_TITLE, '64', '64'); ?></td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="smallText"><br /><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <?php
				if ($messageStack->size('create_account') > 0)
				{
				  ?>
				  <tr>
					<td><?php echo $messageStack->output('create_account'); ?></td>
				  </tr>
				  <tr>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
				  </tr>
				  <?php
				}
			  ?>
			  <tr>
				<td>
				  <table border="0" width="100%" cellspacing="0" cellpadding="2">
					<tr>
					  <td class="main"><b><?php echo CATEGORY_PERSONAL; ?></b></td>
					  <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <tr>
				<td>
				  <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
					<tr class="infoBoxContents">
					  <td>
						<table border="0" cellspacing="2" cellpadding="2">
						  <?php
							if (ACCOUNT_GENDER == 'true')
							{
							  ?>
							  <tr>
								<td class="main"><?php echo ENTRY_GENDER; ?></td>
								<td class="main"><?php echo tep_draw_radio_field('gender', 'm') . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f') . '  ' . FEMALE . ' ' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?></td>
							  </tr>
							  <?php
							}
						  ?>
						  <tr>
							<td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
							<td class="main"><?php echo tep_draw_input_field('firstname') . ' ' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?></td>
						  </tr>
						  <tr>
							<td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
							<td class="main"><?php echo tep_draw_input_field('lastname') . ' ' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
						  </tr>
						  <?php
							if (ACCOUNT_DOB == 'true')
							{
							  ?>
							  <tr>
								<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
								<td class="main"><?php echo tep_draw_input_field('dob') . ' ' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td>
							  </tr>
							  <?php
							}
						  ?>
						  <tr>
							<td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
							<td class="main"><?php echo tep_draw_input_field('email_address') . ' ' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td>
						  </tr>
						</table>
					  </td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <?php
				if (ACCOUNT_COMPANY == 'true')
				{
				  ?>
				  <tr>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
				  </tr>
				  <tr>
					<td class="main"><b><?php echo CATEGORY_COMPANY; ?></b></td>
				  </tr>
				  <tr>
					<td>
					  <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
						<tr class="infoBoxContents">
						  <td>
							<table border="0" cellspacing="2" cellpadding="2">
							  <tr>
								<td class="main"><?php echo ENTRY_COMPANY; ?></td>
								<td class="main"><?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
							  </tr>
							</table>
						  </td>
						</tr>
					  </table>
					</td>
				  </tr>
				  <?php
				}
			  ?>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></td>
			  </tr>
			  <tr>
				<td>
				  <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
					<tr>
					  <td>
						<table border="0" cellspacing="2" cellpadding="2" class="content2">
						  <tr>
							<td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
							<td class="main"><?php echo tep_draw_input_field('street_address') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>
						  </tr>
						  <?php
							if (ACCOUNT_SUBURB == 'true')
							{
							  ?>
							  <tr>
								<td class="main"><?php echo ENTRY_SUBURB; ?></td>
								<td class="main"><?php echo tep_draw_input_field('suburb') . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>
							  </tr>
							  <?php
							}
						  ?>
						  <tr>
							<td class="main"><?php echo ENTRY_POST_CODE; ?></td>
							<td class="main"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
						  </tr>
						  <tr>
							<td class="main"><?php echo ENTRY_CITY; ?></td>
							<td class="main"><?php echo tep_draw_input_field('city') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>
						  </tr>
						  <?php
							if (ACCOUNT_STATE == 'true')
							{
							  ?>
							  <tr>
								<td class="main"><?php echo ENTRY_STATE; ?></td>
								<td class="main">
								  <?php
									if ($process == true)
									{
									  if ($entry_state_has_zones == true)
									  {
										$zones_array = array();
										$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
										while ($zones_values = tep_db_fetch_array($zones_query))
										{
										  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
										}
										echo tep_draw_pull_down_menu('state', $zones_array);
									  }
									  else
									  {
										echo tep_draw_input_field('state');
									  }
									}
									else
									{
									  echo tep_draw_input_field('state');
									}

									if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT. '</span>';
								  ?>
								</td>
							  </tr>
							  <?php
							}
						  ?>
						  <tr>
							<td class="main"><?php echo ENTRY_COUNTRY; ?></td>
							<td class="main"><?php echo tep_get_country_list('country') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
						  </tr>
						</table>
					  </td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main"><b><?php echo CATEGORY_CONTACT; ?></b></td>
			  </tr>
			  <tr>
				<td>
				  <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
					<tr class="infoBoxContents">
					  <td>
						<table border="0" cellspacing="2" cellpadding="2">
						  <tr>
							<td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
							<td class="main"><?php echo tep_draw_input_field('telephone') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td>
						  </tr>
						  <tr>
							<td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td>
							<td class="main"><?php echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>
						  </tr>
						</table>
					  </td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main"><b><?php echo CATEGORY_OPTIONS; ?></b></td>
			  </tr>
			  <tr>
				<td>
				  <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
					<tr class="infoBoxContents">
					  <td>
						<table border="0" cellspacing="2" cellpadding="2">
						  <tr>
							<td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
							<td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>
						  </tr>
						</table>
					  </td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main"><b><?php echo CATEGORY_PASSWORD; ?></b></td>
			  </tr>
			  <tr>
				<td>
				  <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
					<tr class="infoBoxContents">
					  <td>
						<table border="0" cellspacing="2" cellpadding="2">
						  <tr>
							<td class="main"><?php echo ENTRY_PASSWORD; ?></td>
							<td class="main"><?php echo tep_draw_password_field('password') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>
						  </tr>
						  <tr>
							<td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>
							<td class="main"><?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?></td>
						  </tr>
						</table>
					  </td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
<?php
//-----   BEGINNING OF ADDITION: MATC   -----//
if(MATC_AT_REGISTER != 'false'){
require(DIR_WS_MODULES . 'matc.php');
}
//-----   END OF ADDITION: MATC   -----//
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<?php //-----   CHANGE IN ROW BELOW: MATC  - Added id="TheSubmitButton"   -----// ?>
			<td><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE,'id="TheSubmitButton"'); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
			</table>
		  </form>
		</td>
	</tr>
  </table>
  <!-- body_eof //-->
</div>
</div>
  <!-- footer //-->
  <?php include(DIR_WS_INCLUDES . 'footer.php'); ?>
  <!-- footer_eof //-->
</div>
 </body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

thanks for any help !

 

best regards, tommy aka Phoebus Ryan

 

P.S: For those people who can speak german I've got the same thread in german Click Here

Share this post


Link to post
Share on other sites

Hi All.

 

I have been trying to integrate this excellent module with my PayPal Standard payment module and am not having any joy at all! I'm running off osCommerce 2.2rc2a and was wondering whether anyone else has had problems getting PayPal Standard and UHTML Emails working together?

 

I've got UHTML working fine with 'Moneyorder', so it's installed correctly in /chekout_process.php - however I'm not generating HTML emails through PayPal Standard. My search has lead me to the /includes/modules/payment/paypal_standard.php file which seems to run the chekout_process script itself. But on inserting the UHTML ifelse statement in there, it breaks the process... so I'm a little lost!

 

If anyone has got it working and could give me some pointers, I'd be very greatful!

 

Regards,

James

Share this post


Link to post
Share on other sites
Hi All.

 

I have been trying to integrate this excellent module with my PayPal Standard payment module and am not having any joy at all! I'm running off osCommerce 2.2rc2a and was wondering whether anyone else has had problems getting PayPal Standard and UHTML Emails working together?

 

I've got UHTML working fine with 'Moneyorder', so it's installed correctly in /chekout_process.php - however I'm not generating HTML emails through PayPal Standard. My search has lead me to the /includes/modules/payment/paypal_standard.php file which seems to run the chekout_process script itself. But on inserting the UHTML ifelse statement in there, it breaks the process... so I'm a little lost!

 

If anyone has got it working and could give me some pointers, I'd be very greatful!

 

Regards,

James

 

Just having a look at my PayPal set-up and noticed that I have set my PayPayl return file as \checkout_process.php - I'm wondering whether this has an effect on the UHTML email contribution??

 

Is it possible that I need to include the UHTML 'ifelse' statement inside the \includes\modules\payment\paypal_standard.php script but set my PayPal return address to checkout_success.php rather than checkout_process.php? It seems as is paypal_standard builds the order up itself and tep_href_link to checkout_success.php...

 

These are just some thoughts.. so would be great to get some direction from anyone who has this module working!

 

Cheers

James

Share this post


Link to post
Share on other sites

I installed this today and really like it. I need to add the code to my MVS contrib but i'm not clear on how to do it. Any ideas?


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

Hi! First: thank you for this great contrib!

 

Almost everything works. But the mail from order.php (sent when changing order status) is in the old style although I installed everything and edited the design of the order.php-files?

can you give me a hint?

when I sent Emails from the osc-admin, can I edit that design too? if yes, where?

 

thank you!

 

greetz from germany

Addi

Share this post


Link to post
Share on other sites
Hi! First: thank you for this great contrib!

 

Almost everything works. But the mail from order.php (sent when changing order status) is in the old style although I installed everything and edited the design of the order.php-files?

can you give me a hint?

when I sent Emails from the osc-admin, can I edit that design too? if yes, where?

 

thank you!

 

greetz from germany

Addi

 

 

Hi Addi,

 

What other contributions do you have installed that may conflict with admin\orders.php? If you post your code for admin\orders.php - I'll have a quick look for you. You will also need to post your includes\modules\UHtml Emails\****\orders.php file too.

 

Regards

James

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×