Jump to content



Latest News: (loading..)

* * * - - 2 votes

[Contribution] U HTML Emails


  • Please log in to reply
238 replies to this topic

#61   jhande

jhande
  • Members
  • 2,112 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 31 July 2008 - 09:19 PM

View PostOlof Larsson, on Jul 31 2008, 02:24 PM, said:

Basic html. Please take a basic html course ;)
Thanks for the suggestion Olof, but I do know basic HTML.  <_<

Quote

Change:
<font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:12px;">
<br />
'.str_replace($ArrayLNTargets, '<br />', $HTMLEmailOrderTotals).'
<br />';

To:
<font face="Verdana, Arial, Helvetica, sans-serif" align="right" style="font-size:12px;">
<br />
'.str_replace($ArrayLNTargets, '<br />', $HTMLEmailOrderTotals).'
<br />';

I only added align="right"
That should do it.
Yes, one would think that should work, but it doesn't, at least not viewing the sent email in Outlook Express.
I got it to work by enclosing that code in a DIV tag and aligning that right. ;)


View PostOlof Larsson, on Jul 31 2008, 02:36 PM, said:

I gues you have installed wrong or there is a clash with an other contribution.

Try to install again and be detailed. Use Beyond Compare (a program)

I will triple check my installation again using my WinMerge, but I didn't spot anything wrong when I double checked it.

I do have a few contributions added but nothing that changed the checkout process. I'll probably just forget about that feature and keep designing my layout from an original checkout PHP file.

Thanks anyway for trying to help!
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#62   Olof Larsson

Olof Larsson
  • Members
  • 91 posts
  • Real Name:Olof Larsson
  • Gender:Male
  • Location:Sweden

Posted 02 August 2008 - 05:59 PM

View Postjhande, on Jul 31 2008, 10:19 PM, said:

Yes, one would think that should work, but it doesn't, at least not viewing the sent email in Outlook Express.
I got it to work by enclosing that code in a DIV tag and aligning that right. ;)

Very well done!  :lol:
Sorry for sounding rude. I was a bit tired when I wrote it. Sorry :)

#63   Olof Larsson

Olof Larsson
  • Members
  • 91 posts
  • Real Name:Olof Larsson
  • Gender:Male
  • Location:Sweden

Posted 02 August 2008 - 07:12 PM

New version online!

New in this version:

* Bugfix: Some errors in the code for deciding wheter to say Mr. Ms. or non of them where fixed.
* New feature! The newsletters (not product notificatons as I don't use them myself and didn't have time) are now sent in many smaller packages to avoid timeouts. This works simmilar to the contribution "advanced bulk mailer" which I took inspiration from, but is safer, works automaticaly and has a progress bar.

Regards Olof Larsson / Lajvbutiken.se

#64   jhande

jhande
  • Members
  • 2,112 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 02 August 2008 - 07:36 PM

View PostOlof Larsson, on Aug 2 2008, 01:59 PM, said:

Very well done! :lol:
Sorry for sounding rude. I was a bit tired when I wrote it. Sorry :)

Thank you Olof ;)

No problem, I was tired myself trying to figure out different bugs and glitches throughout my site. I should have just taken a break and tried some more before asking for help.  :blush:

A new version, fantastic news thank you!

:D
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#65   alba

alba
  • Members
  • 107 posts
  • Real Name:alba

Posted 03 August 2008 - 12:24 PM

View Postjhande, on Jul 20 2008, 07:34 PM, said:

Fantastic contribution, thanks Olof! :)

I was starting to have fun creating my own slightly altered version of the Stripes - checkout_process.php until I ran into a snag.
Actually it's a lack of knowledge on my part. :blush:

What I am trying to do is align-right the following text output:

Sub-Total: $47.95
United States Postal Service (1 x 4lbs) (Parcel): $10.13
Total: $58.08

No matter how I try editing this bit of code, it makes a mess or returns error messages:
</table>
<font face="Verdana, Arial, Helvetica, sans-serif" style="font-size:12px;">
  <br />
  '.str_replace($ArrayLNTargets, '<br />', $HTMLEmailOrderTotals).'
  <br />';

I'm sure I am missing something simple, but I haven't figured it out in 3 hours. :(

I actually understand what your wanting to do. An align=right wont quite do the trick

Halfway to the solution is to replace the code:
		$html_email .='
		</table>
		<font face="Times New Roman, Times, serif" style="font-size:14px;">
		<br />
		'.str_replace($ArrayLNTargets, '<br />', $HTMLEmailOrderTotals).'
		<br />';

with

		$html_email .='
			<tr style="background-color:#DDDDDD;">
		<td valign="top" align="right" colspan="5"><font face="Times New Roman, Times, serif" style="font-size:14px;">
		<br />
		'.str_replace($ArrayLNTargets, '<br />', $HTMLEmailOrderTotals).'
		<br />
		</td></tr></table>';

the problem with that however is the order totals are pulled from the $order_totals[$i]['text'] variable so theres no formatting for each line of the totals available unless you recode the module and checkout_process.php to have individual variables

#66   alba

alba
  • Members
  • 107 posts
  • Real Name:alba

Posted 03 August 2008 - 12:26 PM

and of course then i read the last page of the discussion straight after posting it and i see you sorted it with a div tag...LOL

oh well 2 ways of doing it

#67   jhande

jhande
  • Members
  • 2,112 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 03 August 2008 - 06:57 PM

View Postalba, on Aug 3 2008, 08:26 AM, said:

and of course then i read the last page of the discussion straight after posting it and i see you sorted it with a div tag...LOL

oh well 2 ways of doing it

Thank you for offering a solution anyway. ;)
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#68   rickeyl

rickeyl
  • Members
  • 106 posts
  • Real Name:Rickey

Posted 07 August 2008 - 12:32 PM

I love this contribution.
I have 3 questions about the contribution. Any help would be greatly appreciated.

1. Why does it send 2 emails to the customer when they place an order?
    Both emails are different.  

Email_1
Email_2

2. How do I attach a PDF invoice link to the order email?

3. How do I change the collor in Email_2 to navy?

#69   ultras.nick

ultras.nick
  • Members
  • 43 posts
  • Real Name:Nick

Posted 17 August 2008 - 07:20 PM

Very good and useful contribution.

Great job man.

But I have two issues regarding this contribution:

1. It does not have support for the Send Mail from Admin Panel  :(  - I tried to figure how should I modify mail.php to make it work but, no result.

2. In my mails for Orders - I have only 'Dear .name.' - without any gender like is in Password Forgotten and Welcome Mail.

Can help on those?  :)

Ragards
and thanks for this great contribution.

#70   jhande

jhande
  • Members
  • 2,112 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 18 August 2008 - 12:16 AM

View Postrickeyl, on Aug 7 2008, 08:32 AM, said:

I love this contribution.
I have 3 questions about the contribution. Any help would be greatly appreciated.

1. Why does it send 2 emails to the customer when they place an order?
Both emails are different.

Email_1
Email_2
I can only guess at this one. It might be possible of an editing error from adding the contribution.

Quote

2. How do I attach a PDF invoice link to the order email?
Sorry, again I can not help. Why attach a link for a PDF file? They could print the email as is.

Quote

3. How do I change the collor in Email_2 to navy?

Edit - catalog/includes/modules/UHtmlEmails/Forest Green/Checkout_process.php
Look for:
Line 66 - <table width="100%" height="75px" border="0" background="'. HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_MODULES .'UHtmlEmails/'.ULTIMATE_HTML_EMAIL_LAYOUT.'/mailgradient.png" cellpadding="0" cellspacing="0"><tr valign="middle"><td>Line 70 - <div style="font-size:14px; padding: 1em; border-style:solid; border-width: 14px; border-color: #87A44C; background-color:#FFFFFF;">
Line 98 - <tr style="background-color:#87A44C; color:#FFFFFF; font-weight:bold;">
Line 133 - <tr style="background-color:#87A44C; color:#FFFFFF; font-weight:bold;">';

Replace the above image and/or color code with your choice [Navy = #000080]


HTML Color Names - W3C nice example chart - click here.
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#71   rickeyl

rickeyl
  • Members
  • 106 posts
  • Real Name:Rickey

Posted 18 August 2008 - 12:25 PM

View Postjhande, on Aug 18 2008, 01:16 AM, said:

I can only guess at this one. It might be possible of an editing error from adding the contribution.


Sorry, again I can not help. Why attach a link for a PDF file? They could print the email as is.


Edit - catalog/includes/modules/UHtmlEmails/Forest Green/Checkout_process.php
Look for:
Line 66 - <table width="100%" height="75px" border="0" background="'. HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_MODULES .'UHtmlEmails/'.ULTIMATE_HTML_EMAIL_LAYOUT.'/mailgradient.png" cellpadding="0" cellspacing="0"><tr valign="middle"><td>Line 70 - <div style="font-size:14px; padding: 1em; border-style:solid; border-width: 14px; border-color: #87A44C; background-color:#FFFFFF;">
Line 98 - <tr style="background-color:#87A44C; color:#FFFFFF; font-weight:bold;">
Line 133 - <tr style="background-color:#87A44C; color:#FFFFFF; font-weight:bold;">';

Replace the above image and/or color code with your choice [Navy = #000080]


HTML Color Names - W3C nice example chart - click here.


#72   rickeyl

rickeyl
  • Members
  • 106 posts
  • Real Name:Rickey

Posted 18 August 2008 - 12:36 PM

Thanks for your reply, I guess I need to remove PDF Invoices all together as it is probably just slowing down my site anyway. The customer does have an order receipt for their records. I have another question if anyone can help.
I have the order editor contribution installed so I can send the customer their tracking info. In Admin>> Edit Orders, there is a textbox to place the tracking number. When I update the order with the tracking number included, the email the customer receives is in plain text with a working link to there order on my site and a link to UPS or FedEx for them to track there order. Can I set that email to look like the rest of the emails with Ultimate HTML Emails? If so, how?

#73   jhande

jhande
  • Members
  • 2,112 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 21 August 2008 - 10:47 AM

View Postrickeyl, on Aug 18 2008, 08:36 AM, said:

When I update the order with the tracking number included, the email the customer receives is in plain text with a working link to there order on my site and a link to UPS or FedEx for them to track there order. Can I set that email to look like the rest of the emails with Ultimate HTML Emails? If so, how?
Hey Rickey,

You are welcome, wish I could have been able to help more. :blush:

I can take an educated crack at it.
First, if the links are clickable in the sent email, my guess it is actually sending as HTML although the rest is formatted to look like plain text.
I would image you could open whatever file that contribution is using to create and/or send the email and edit it. Use the structure of one of the Ultimate HTML Emails as a template. One thing to remember, when sending HTML emails all the format coding has to be within the body tags and inline. You can't use CSS styles, just old fashioned HTML coding per tag. Take a look at some of the refferences Olof included. You can also Google for more and HTML codes.

Hope that at least might point you in the right direction?
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#74   jhande

jhande
  • Members
  • 2,112 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 21 August 2008 - 11:27 AM

I went back through my installation and fixed my previous issues.

I thought all was well as everything seemed to be working just fine, even the development emails.

I previously created my own folder in catalog\includes\modules\UHtmlEmails\Handes Hobbies
In that folder I have my slightly edited versions of the PHP files.
In my Admin Panel my Handes Hobbies is chosen.

The problem I am having:
When I create an account, it sends out the Stripes create_account.php instead of the Handes Hobbies create_account.php

But yet the checkout_process.php and orders.php are fine, they are from my Handes Hobbies folder.

Any idea what to look for that might be causing this? :huh:
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.3 install -

#75   JWDegas

JWDegas
  • Members
  • 10 posts
  • Real Name:Jeremy Walker

Posted 01 September 2008 - 10:08 PM

Hi,

It's been a long day and everything's working apart from being able to generate a UHTMLEmail invoice using the PayPal standard module.

I've tried the if/else updates on page 2 of this thread and the manual but keep getting directory errors like

Warning: paypal_standard::require(includes/modules/UHtmlEmails/checkout_process_Basic.php) [paypal-standard.require]: failed to open stream: No such file or directory in /home/fhlinux165/n/nickreevemusic.com/user/htdocs/store/includes/modules/payment/paypal_standard.php on line 527

Warning: paypal_standard::require(includes/modules/UHtmlEmails/checkout_process_Basic.php) [paypal-standard.require]: failed to open stream: No such file or directory in /home/fhlinux165/n/nickreevemusic.com/user/htdocs/store/includes/modules/payment/paypal_standard.php on line 527

Fatal error: paypal_standard::require() [function.require]: Failed opening required 'includes/modules/UHtmlEmails/checkout_process_Basic.php' (include_path='.:/usr/share/pear/') in /home/fhlinux165/n/nickreevemusic.com/user/htdocs/store/includes/modules/payment/paypal_standard.php on line 527

I'll have another look tomorrow but wondering if there is any definitive workaround for paypal_standard to point me on my way.

Many thanks, and for the contrib too which is (nearly!) doing everything I wanted when I first saw the default OsCommerce mails.

#76   conta_b

conta_b
  • Members
  • 17 posts
  • Real Name:Adelino

Posted 08 September 2008 - 11:13 PM

Hi, great work this contribution.
I installed and everything goes fine except the subject of "tell_a_friend" -> is empty!!
Here the code of my tell_a_friend.php:


//---  Beginning of addition: Ultimate HTML Emails  ---//
if (EMAIL_USE_HTML == 'true') {
require(DIR_WS_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/tell_a_friend.php');
$email_body = $html_email;
}else{//Send text email
//---  End of addition: Ultimate HTML Emails  ---//
  $email_subject = sprintf(TEXT_EMAIL_SUBJECT, $from_name, STORE_NAME);
      $email_body = sprintf(TEXT_EMAIL_INTRO, $to_name, $from_name, $product_info['products_name'], STORE_NAME) . "\n\n";

      if (tep_not_null($message)) {
        $email_body .= $message . "\n\n";
      }

      $email_body .= sprintf(TEXT_EMAIL_LINK, tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false)) . "\n\n" .
                     sprintf(TEXT_EMAIL_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
//---  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_tell_a_friend.htm';
$TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file");
fwrite($TheFileHandle, $email_body);
fclose($TheFileHandle);
}
//---  End of addition: Ultimate HTML Emails  ---//
      tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);

      $messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info['products_name'], tep_output_string_protected($to_name)), 'success');

      tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
    }
  } elseif (tep_session_is_registered('customer_id')) {
    $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
    $account = tep_db_fetch_array($account_query);

    $from_name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];
    $from_email_address = $account['customers_email_address'];
  }

==========================

Thanks

#77   meulenb

meulenb
  • Members
  • 41 posts
  • Real Name:Bart

Posted 09 September 2008 - 07:34 PM

Hi there,

after I've installed U html (yes after making a backup first) I've added many other contributions only to find out at the end that U html wouldn't work out for me.
I've then executed an uninstall by putting original files back and crosschecking that no file had the "//---  Beginning of addition: Ultimate HTML Emails  ---//" sections anymore.

This has worked out fine for U html: everything related to it is gone in the Admin and I can use the 'normal' newsletter functions. The Bulkmailer is however still active somehwere: although it's removed from the configuration table, the code is still looking for it which leads to the following error when sending a letter:


1064 - You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the right syntax to use 
near 'BULKMAILER_LIMIT' at line 1

select customers_firstname, customers_lastname, customers_email_address 
from customers_temp limit BULKMAILER_LIMIT

[TEP STOP]

I do understand what the error means (a function is looking for the bulkmailer value in config table) but I can't seem to find which php file is still running the bulkmailer and therefore causing the issue.

Many thanks for some help on this please!

#78   meulenb

meulenb
  • Members
  • 41 posts
  • Real Name:Bart

Posted 09 September 2008 - 08:11 PM

View Postmeulenb, on Sep 9 2008, 09:34 PM, said:

Hi there,

after I've installed U html (yes after making a backup first) I've added many other contributions only to find out at the end that U html wouldn't work out for me.
I've then executed an uninstall by putting original files back and crosschecking that no file had the "//---  Beginning of addition: Ultimate HTML Emails  ---//" sections anymore.

This has worked out fine for U html: everything related to it is gone in the Admin and I can use the 'normal' newsletter functions. The Bulkmailer is however still active somehwere: although it's removed from the configuration table, the code is still looking for it which leads to the following error when sending a letter:


1064 - You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the right syntax to use 
near 'BULKMAILER_LIMIT' at line 1

select customers_firstname, customers_lastname, customers_email_address 
from customers_temp limit BULKMAILER_LIMIT

[TEP STOP]

I do understand what the error means (a function is looking for the bulkmailer value in config table) but I can't seem to find which php file is still running the bulkmailer and therefore causing the issue.

Many thanks for some help on this please!

Forget it, already figured it out!

#79   martina

martina
  • Members
  • 13 posts
  • Real Name:Martina di Vertacollini

Posted 10 September 2008 - 10:44 AM

View PostOlof Larsson, on Mar 18 2008, 06:14 PM, said:

This is an html email contribution for osCommerce Online Merchant [2.2rc2]. It will replace the standard emails with emails that have more advanced layout and design. The contribution allows you to have different "html email layouts" installed at the same time. New layouts can easily be created and installed. You can easily change between the different "html email layouts" from a dropdown menu, "E-Mail Options"->"Html Email Layout", in the admin panel.


Hi,
I have been trying to implement both contributions U HTML (works fine, I love it) and the Edit Orders contribution, also a great contribution but for the email notifications.
The problem is that Edit Orders only creates text-emails and there are many places in the code where emails are created.
I would like that contribution to use Utml emails but I cannot get it to work.
Has anyone created an integration of the two?
I would like to see how you did that.
THX
Martina
(I also wrote this as a separate topic but this might be a better place)

#80   bizkit1

bizkit1
  • Members
  • 6 posts
  • Real Name:FLorin

Posted 10 September 2008 - 06:54 PM

Hello, i have a problem. This is the way the mail is recived:


FANIT to me
show details 21:49 (3 minutes ago) Reply


--=_90cb4d49facc2d372f818986986d7931 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Dear xxx,Thank you for shopping with us today.Please find below the details of your order. Order Number: 9 Detailed Invoice: http://www.fanmegastore.ro/account_history_info.php?order_id=9 Date Ordered: 10 September, 2008 Contents of the order ProductModelPrice (Inc. VAT)Qty.Total (Inc. VAT) KINETIX LCDTV, 26", 700:1,500c, 8ms, WXGAKTLCDTV261,517.25RON11,517.25RONSub-Total: 1,517.25RONTVA: 242.25RONTotal: 1,517.25RONPayment Method: Plata la livrareDelivery AddressBilling AddressFlorin Stanagigelbucuresti, 021678B, RomaniaFlorin Stanagigelbucuresti, 021678B, Romania --=_90cb4d49facc2d372f818986986d7931 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable 
Dear Florin S= tana,
Thank you for shopping with us today.
Please find bel= ow the details of your order.

= = Order Number: 9
<= td><= strong>Detailed Invoice: http://www.fanmegastor= e.ro/account_history_info.php?order_id=3D9
= Date Ordered: 10 September, 2008= 

Contents of the order
Product= ModelPrice (Inc. VAT)= Qty.Total (Inc. VAT)
KINETIX LCDTV, 26", 700:1,500c, 8ms, WXGAKTLCDTV261= ,517.25RON11,517.25RON

Sub-To= tal: 1,517.25RON
TVA: 242.25RON= 
Total: 1,517.25RON

Payment Method: Plata la livrare

Delivery AddressBilling Address
xxxx
gigel
bucuresti, 021678
B, xxxxxx
gigel
bucuresti, 021678
B, Romania= 

--=_90cb4d49facc2d372f818986986d7931--

can you help me?