Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] U HTML Emails


Recommended Posts

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. :(

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

i have just installed u-html email. It works fine.

But i still have one prob.

Can it be, that the check for the gender doesn´t work.

I had a male customer, but when i send a new password by password forgotten, so the greeting in the mail is Dear Ms.

Where´s the Problem?. :huh:

 

Kind Regards

 

hoschibo - Germany

Link to comment
Share on other sites

Having another slight problem.

 

U Html Emails - Development Mode = True

 

I do NOT get any - "catalog/Last_mail_from_checkout_process.php.htm".

 

Any ideas? :huh:

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Yes of course :)

Everything is possible and that does not seem to hard, however I do myself use a pdf invoice contribution so I won't fix that... not right now anyway :) but it could be a good idea.

 

Hi Olof,

 

Would it be possible for you to modify this contribution so that when I click 'Invoice' from the Orders section on the Admin side of my site it would show one of these HTML email templates instead of the boring standard OsCommerce invoice?

 

Thanks!

Link to comment
Share on other sites

Hello :) You're welcome,

 

Q: Question for you though, is the uhtml newsletter contribution able to have emails throttled?

A: No not right now.

 

I don't know what will make you banned actually... it is the server most truly that could get blacklisted for sending many emails at once. But I'm not familliar with this.

 

 

 

Thanks for the contrib Olof... I have yet to install it but it appears to be just what one of our customer's needs. Question for you though, is the uhtml newsletter contribution able to have emails throttled? We have some customers with tens of thousands of email subscribers who would get black listed by their ISP's if they sent out that many newsletters at the same time.

 

Any insight is appreciated.

Link to comment
Share on other sites

Basic html. Please take a basic html course ;)

 

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.

 

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. :(

Link to comment
Share on other sites

This is very interesting!

$gender is not defined in the file where the email generating module is included.

 

This is a bug. Thank you for finding it. This will be fixed in the next release.

 

The following code can be added somewhere before the $gender variable is used:

$check_customer_query_uhtml = tep_db_query("select customers_gender from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
$check_customer_uhtml = tep_db_fetch_array($check_customer_query_uhtml);
$gender = $check_customer_uhtml['customers_gender'];

 

I just wrote it and have not tested it so it might contain typos etc.

 

Hello,

 

i have just installed u-html email. It works fine.

But i still have one prob.

Can it be, that the check for the gender doesn´t work.

I had a male customer, but when i send a new password by password forgotten, so the greeting in the mail is Dear Ms.

Where´s the Problem?. :huh:

 

Kind Regards

 

hoschibo - Germany

Link to comment
Share on other sites

Yes. But some modification might be needed.

Make sure you know the differences between RC1 and RC2a.

 

A good idea for you might be to learn how to use the program Beyond Compare ^^

Good Luck!

 

Hello,

 

Will this contribution work for MS2.2 RC1?

 

Thanks Jr

Link to comment
Share on other sites

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)

 

Having another slight problem.

 

U Html Emails - Development Mode = True

 

I do NOT get any - "catalog/Last_mail_from_checkout_process.php.htm".

 

Any ideas? :huh:

Link to comment
Share on other sites

Basic html. Please take a basic html course ;)

Thanks for the suggestion Olof, but I do know basic HTML. <_<

 

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

 

 

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, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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.

 

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.

 

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, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

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, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

  • 2 weeks later...

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.

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...