Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Send_order_html_email


Elazar

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

Link to comment
Share on other sites

  • Replies 344
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
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

Link to comment
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
Link to comment
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.

Link to comment
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)

Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

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?

Link to comment
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

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
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
Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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 [email protected]

 

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
Link to comment
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.

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