Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * - - 2 votes

[Contribution] U HTML Emails


224 replies to this topic

#221 SimonBidle

  • Community Member
  • 2 posts
  • Real Name:Simon Bidle

Posted 12 March 2012, 18:05

Hi I'm using 2.3.1 and this seems to work apart from two issues:


a) Existing users - if they ask to reset their password - no password is sent an email. this only works of HTML is turned OFF



B) New customers signing up Don't get an initial email.

Again, all works if HTML is turned off.



Any ideas??

#222 SimonBidle

  • Community Member
  • 2 posts
  • Real Name:Simon Bidle

Posted 12 March 2012, 19:00

Doh; looks like my spam filter grabbed them!!!

#223 magnetiKmania

  • Community Member
  • 12 posts
  • Real Name:Berta Devant

Posted 20 March 2012, 20:02

Hi Olof,

I just downloaded your contribution but I cannot find the install text, there is only a small text in Portuguese and 5 php files, is that okey?

#224 nielss

  • Community Member
  • 30 posts
  • Real Name:Niels

Posted 05 May 2012, 13:45

I am completly stuck on this one....

for some odd reason I really can't find it isn't sending welcome emails in HTML. Here is the create account.php snippet:
if (EMAIL_USE_HTML == 'true') {
require(DIR_WS_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/create_account.php');
$email_text = $html_email;

}else{
bla bla bla
No I have no idea why but EMAIL_USE_HTML content is ALWAYS false. No mather what it selected.
in the DB:
it is 'true' but for some odd reason it isn't getting selected!

i'm on 2.2RC2 heavy modified

Anyone knows why?

Edited by nielss, 05 May 2012, 13:59.


#225 gfasal

  • Community Member
  • 342 posts
  • Real Name:George
  • Gender:Male
  • Location:Sevilla, Spain

Posted 07 May 2012, 14:14

ok check this:

create account.php

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

// reset session token
$sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand());

// 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 ---//
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
}
}

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

require(DIR_WS_INCLUDES . 'template_top.php');
require('includes/form_check.js.php');
?>
OSC 2.3.1
INSTALLED:Document Manager / Monthly Sales and Tax Returns / Batch Print Invoices / Ultimate HTML EMAILs / AJAX Attribute Manager / OSC PDF Catalog / Move Bookmarks / Sort Order / Easy Populate / Sales Reports / Low Stock Report / Admin: Model # on Category / Product Administration Screen / Mini images in admin / SLiCK reCaptcha / Google + / Beautiful Breadcrumbs / 2.3.1 - Banner Language Mod / ADD New Page / EASY MAP (google) v.3.0 / Who's Online Enhancement for 2.3.1 / Admin Notes / scrambled order number / remove_unused_images / Quantity Select / Unit Weight / Product Specifions (filter results) / AJAX Product Attributes/ Attribute Codes/ Date & Order No. to Invoice/ O.P.I. 2.0 / Attribute Images / Manual Order Editor / Attributes Clone / Order Editor / Create Order / Company VAT No. / Add customer/ CKEditor 2.3.1 / Page Manager / Default images via admin / Percentage Shipping Price / QTPro / Scroll to Top / PDF Invoice / Featured Products / Product Listing Enhancements / AutoBackups / ..Custom Admin Mods /