Jump to content
Sign in to follow this  
Elazar

[contribution] Send_order_html_email

Recommended Posts

For everyone that need support for send_order_html_email

 

Please post your topic here !!

 

I didn't write this contribution, but I thought it could be a good idea to open a special support forum for it, since there is not !!

 

OF COURSE with all the respect for the authors of this great contribution!

 

Great Day to you all !!

 

 

AS a start, Could someone translate this contrib. from FRANCH to English ???

Share this post


Link to post
Share on other sites

i have just spent the last couple of days trying to work with this module. The problem is not that it is in French (translation is available in the contribution, the readme file is bilingual) but that it's all over the place.

 

To begin with, version 6.3(2) uploaded by Maxime on 2nd May 2007 is not complete. Some of the files are missing (e.g. FCK Editor) and the readme file incorporates methods used in earlier versions which are not used in this one, so it's hard to gather what needs to be done.

Remarks for beginning and ending of contribution code in files is sometimes missing, so you might see where something ends, but not where it begun.

 

Well, I tried slowly working those problems and when I had finished I tried editing a template on the admin side. It didn't work. Having empty directories seem to point that some files are just missing from this "full" package.

 

I revertef back to my back up and decided to start from version 1 and slowly work my way up. This wasn't successful as well as some files are in the wrong directories, and some code alterations include other contributions. I do not understand if those are left overs as the contributors uploaded their files rather than clean files, or whether because those contributions are necessary for this one to work, but I don't really want to install contributions I don't need.

Share this post


Link to post
Share on other sites

A new version supporting html emails when creating an account and placing an order has been updated.

 

I'm intending on working to add html emails also when updating status of order.

Share this post


Link to post
Share on other sites
A new version supporting html emails when creating an account and placing an order has been updated.

 

I'm intending on working to add html emails also when updating status of order.

 

Thank you for doing that !! Did you check please that it works smoothly ??

 

Great Day,

 

Elazar

Share this post


Link to post
Share on other sites

V2 uploaded.

 

V2 supports HTML emails when order status is updated or comment added through the administration tool.

Also modified the following files:

-catalog/checkout_process.php

-catalog/includes/modules/email/html_checkout_process.php

-catalog/includes/languages/english/checkout_process.php

-catalog/includes/languages/english/create_account.php

This fixes a small bug when paying by cheque and makes the design of all three emails consistent.

 

All the information is within the readme file.

Edited by Untitled No 4

Share this post


Link to post
Share on other sites
Thank you for doing that !! Did you check please that it works smoothly ??

 

Great Day,

 

Elazar

 

I have made all efforts to make sure it works smoothly. Have tested it quite a bit to make sure things are working fine. Things are even better with V2 as emails were reformatted and a small bug was fixed.

 

This is quite a straight-forward contribution and I don't see where things could go wrong. If you do find anything wrong just let me know and I'll see what I can do.

 

I don't think I will continue working on this contribution as HTML emails are planned for OsCommerce 3 and until then this should answer most people's requirements. However, I will try to fix bugs, if any are found.

 

A good day to you too.

Share this post


Link to post
Share on other sites

i installed SEND HTML MAIL V1 (12 June 2007)

 

it gives me error.

 

Fatal error: Call to undefined method email::remove_BLF() in C:\ ... \catalog\includes\classes\email.php on line 552 on line 552

 

and i changed $this->remove_BLF($this->output); to remove_BLF($this->output); it work, but i recieved just empty mail. :(( help me pls (sorry my bad english)

Share this post


Link to post
Share on other sites

i changed $send_params['body'] = $this->remove_BLF($this->output);

to $send_params['body'] = "$this->remove_BLF($this->output)";

it works great! :)

Share this post


Link to post
Share on other sites

I'm a bit baffled as email.php is not part of the contribution, is not called for and doesn't even exist in my OsCommerce file system.

The code which you have had problem with is neither part of the contribution.

 

I would assume that email.php is from another contribution which you have or attempted to install, perhaps one of the other contribution for HTML emails? I would suggest that if you don't need it for any other contribution you have it would be better to carefully clean your files from references to files which are not used.

Share this post


Link to post
Share on other sites

Well, after I Installed Send_order_html_email_v1, I get 2 confirmation mails: 1 HTML and 1 text.

The HTML one does not show the actual order (product description):

 

email_confirm.png

The text version does.

 

I can not figure it out: where is the mistake?

Share this post


Link to post
Share on other sites

Sorry.. forgot to say:

 

I updated it to SEND HTML MAIL V2 but still no change...

Share this post


Link to post
Share on other sites
It's possible fix the table in email like the picture?

 

immaginela3.jpg

 

I'm sorry, I don't understand what it is exactly that you want to move, and where. Do you just want it closer to the Qtty?

Share this post


Link to post
Share on other sites
Well, after I Installed Send_order_html_email_v1, I get 2 confirmation mails: 1 HTML and 1 text.

The HTML one does not show the actual order (product description):

 

email_confirm.png

The text version does.

 

I can not figure it out: where is the mistake?

 

ttime, I would need to see the code to be able to help you. Please post the following files:

catalog/checkout_process.php

catalog/includes/modules/email/html_checkout_process.php

 

or alternatively email them to me: untitled.no4 () gmail.com

Share this post


Link to post
Share on other sites

Hi everybody. It's a great contribution.

 

I would like that appears the order number in the mail subject and that show the customer name in "from" field, in the message that I receive from the store. Is it possible? If yes, could explain to me how to do this? Thanks a lot.

Edited by rdbello

Share this post


Link to post
Share on other sites
Hi everybody. It's a great contribution.

 

I would like that appears the order number in the mail subject and that show the customer name in "from" field, in the message that

I receive from the store. Is it possible? If yes, could explain to me how to do this? Thanks a lot.

 

 

Yes it is possible.

 

For extened subject in email

Please open /catalog/checkout_process.php and search for

 

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

 

change it to

 

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

 

then find

 

  tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], 
EMAIL_TEXT_SUBJECT, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');
 $email_order=ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\">\</a>", $email_order);

 

and change it to

 

  tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], 
EMAIL_TEXT_SUBJECT.' ' .EMAIL_TEXT_ORDER_NUMBER.' '. $insert_id, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');
 $email_order=ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\">\</a>", $email_order);

 

 

If you would like to tell the customer his id as well, you have to find

 

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

 

in /catalog/checkout_process.php

 

and change it to

 

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

 

After the changes were made open checkout_process in the language section of your shop admin control panel and insert

 

define('EMAIL_TEXT_CUSTOMER_NUMBER ', 'Your customer-ID : ');

 

have fun

Edited by shetani

Share this post


Link to post
Share on other sites

On the following picture you can see the last modifications made by me

for this contribution

 

Clearly and flexible row and column design

 

htmlmail.jpg

Share this post


Link to post
Share on other sites

Hi Frank,

 

Thanks for the reply. I made the first alterations ans appear that message in checkout_process

 

"Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/restricted/home/site/public_html/checkout_process.php on line 343

 

Parse error: syntax error, unexpected '<' in /home/restricted/home/site/public_html/checkout_process.php on line 343"

 

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

 

Thanks

Share this post


Link to post
Share on other sites
Hi Frank,

 

Thanks for the reply. I made the first alterations ans appear that message in checkout_process

 

"Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/restricted/home/site/public_html/checkout_process.php on line 343

 

Parse error: syntax error, unexpected '<' in /home/restricted/home/site/public_html/checkout_process.php on line 343"

 

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

 

Thanks

 

Hm, the code looks OK and works fine for me.

Because the content of line 343 wasnt changed please try the original one " $email_order=ereg_replace..."

 

The only changes made were

 

from EMAIL_TEXT_SUBJECT ,

to 

EMAIL_TEXT_SUBJECT .' ' .EMAIL_TEXT_ORDER_NUMBER.' '. $insert_id ,

 

and the code snippet looks OK.

Share this post


Link to post
Share on other sites

My old line was:

 

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

 

and after changes:

 

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

 

The differences is the double zeros: <a href=\"\\">\</a>

 

Is it ok?

 

Thanks

Share this post


Link to post
Share on other sites

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

 

Why the zero's (numbers) not show here?

Edited by rdbello

Share this post


Link to post
Share on other sites

I fix it! The problem was this (the zeros).

 

I tested the mail and I receive the new one with order numbr, but, in the "from"field, shows my name. I need that my copy of order shows the customer name and fiels "from". Is it possible?

 

Thanks again.

Share this post


Link to post
Share on other sites
My old line was:

 

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

 

and after changes:

 

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

 

The differences is the double zeros: <a href=\"\\">\</a>

 

Is it ok?

 

Thanks

 

yes it is

Share this post


Link to post
Share on other sites
I fix it! The problem was this (the zeros).

 

I tested the mail and I receive the new one with order numbr, but, in the "from"field, shows my name. I need that my copy of order shows the customer name and fiels "from". Is it possible?

 

Thanks again.

 

 

Only as subject not as "from-field" .

 

like

 

Order Ordernummer xyz from testuser@testmail.com

 

therefore you have to change

 

 

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

to 

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT .' ' .EMAIL_TEXT_ORDER_NUMBER.' '. 
$insert_id .'from '. $order->customer['email_address'],  nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

Edited by shetani

Share this post


Link to post
Share on other sites
I have made all efforts to make sure it works smoothly. Have tested it quite a bit to make sure things are working fine. Things are even better with V2 as emails were reformatted and a small bug was fixed.

 

This is quite a straight-forward contribution and I don't see where things could go wrong. If you do find anything wrong just let me know and I'll see what I can do.

 

I don't think I will continue working on this contribution as HTML emails are planned for OsCommerce 3 and until then this should answer most people's requirements. However, I will try to fix bugs, if any are found.

 

A good day to you too.

Hi

 

What was changed in checkout_process.php to get cheque payemnts to display? I can't find it.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

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
Sign in to follow this  

×