Jump to content



Photo
* * * - - 2 votes

[Contribution] U HTML Emails


  • Please log in to reply
243 replies to this topic

#21   mark27uk3

mark27uk3
  • Members
  • 1,547 posts
  • Real Name:Mark
  • Gender:Male
  • Location:24-7 Mobile Accessories

Posted 22 March 2008 - 22:11

Hi mark27uk3,
Nice to see you are understanding how to use the pluggin /thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' />
I mean sending UHTMLMails from an new file (customers.php) and you create a new module for this useing the pattern supposed to be used.

Well can't honestly see no problems with your tep_mail function.
The tep_mail code will clearly be parsed as you say that the code for outputting the dubug prewiev is reached... and you get no error message...

Perhaps:
You have set "Configuration" --> "E-Mail Options" --> "Send E-Mails" = false
This should be set to true.
Is that the solution?


Hi Olof,

'Send E-Mails' is set to 'True' (I never turned it off lol)

I just dont see why it is not sending the emails because as you say it is creating the html email and saving it in debug format.

Weird /crying.gif' class='bbc_emoticon' alt=':'(' />

Mark
Lifes a bitch, then you marry one, then you die!

#22   Olof Larsson

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

Posted 22 March 2008 - 22:30

Sorry but i can't help you with this.
Please tell me when you find the solution /wink.gif' class='bbc_emoticon' alt=';)' />

Hi Olof,

'Send E-Mails' is set to 'True' (I never turned it off lol)

I just dont see why it is not sending the emails because as you say it is creating the html email and saving it in debug format.

Weird /crying.gif' class='bbc_emoticon' alt=':'(' />

Mark



#23   usvi4me

usvi4me
  • Members
  • 127 posts
  • Real Name:Letty

Posted 24 March 2008 - 14:27

Greetings usvi4me,
That error message means that the function tep_cfg_pull_down_uhtml_email_layout_list() does not exist in the file
/home/mywebsite/public_html/admin/includes/functions/general.php
I can tell because that function is one that comes with my contribution.

You must have forgotten to add that function to the file. /wink.gif' class='bbc_emoticon' alt=';)' />

I have a good adivce for you: Download and get to know the program "Beyond Compare". Please do this. It will make camparing files very easy. This program is not free but you can use it as normal during 30 days. If you do not like to pay you can then use the program WinDiff, which is free, but not as good.

Regards,
Olof Larsson

Thanks for the quick reply. Beyond Compare is for a windows based PC only.
Anyway I carefully (this time) changed all the files as per the included instructions. Now the challenge I am facing is that the drop down selection in U-HTML Layouts is blank. I can not make any selections at all. Any suggestions as always is greatly appreciated.

#24   redrum

redrum
  • Members
  • 218 posts
  • Real Name:Fredrik
  • Gender:Male

Posted 24 March 2008 - 17:08

Hi Olof,

There's a couple of HTML email addons out there. Is there anything your contib does better then the other ones?
Do you know if it is incompatible with any mail client or webmail?

Thanks,
Fredrik

#25   Olof Larsson

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

Posted 25 March 2008 - 12:11

If you do not use programms for pc i can recommend SourceGear Diff Merge. That is a similar program i just found. It is free and can do almost the same things as beyond compare.

Ok you say that the dropdown is blank...
Take a look at the function:
function tep_cfg_pull_down_uhtml_email_layout_list($default_id)
in
"catalog/admin/includes/functions/general.php"
Is searches for the "create_account_XXXX.php" files in the folder
DIR_FS_CATALOG_MODULES.'UHtmlEmails/'

The layouts displayed in the dropdown are the different XXXX found.

If it is blank; no files were found.

Make sure the files are in the directory DIR_FS_CATALOG_MODULES.'UHtmlEmails/

Thanks for the quick reply. Beyond Compare is for a windows based PC only.
Anyway I carefully (this time) changed all the files as per the included instructions. Now the challenge I am facing is that the drop down selection in U-HTML Layouts is blank. I can not make any selections at all. Any suggestions as always is greatly appreciated.



#26   Olof Larsson

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

Posted 25 March 2008 - 12:18

Well actually the reason I created this contribution were that I wanted html mails for my own site and I didn't find any contribution I felt were good enough.

If it is any good is up to you to decide, but I think it is very good /wink.gif' class='bbc_emoticon' alt=';)' />

No I do not think it is incompatible with anything.
The layouts must be programmed carfully due to the speciall rules for css and scripts in html emails that different mail clients have.
The provided layouts are working all ok I think.


Hi Olof,

There's a couple of HTML email addons out there. Is there anything your contib does better then the other ones?
Do you know if it is incompatible with any mail client or webmail?

Thanks,
Fredrik



#27   usvi4me

usvi4me
  • Members
  • 127 posts
  • Real Name:Letty

Posted 25 March 2008 - 20:12

If you do not use programms for pc i can recommend SourceGear Diff Merge. That is a similar program i just found. It is free and can do almost the same things as beyond compare.

Ok you say that the dropdown is blank...
Take a look at the function:
function tep_cfg_pull_down_uhtml_email_layout_list($default_id)
in
"catalog/admin/includes/functions/general.php"
Is searches for the "create_account_XXXX.php" files in the folder
DIR_FS_CATALOG_MODULES.'UHtmlEmails/'

The layouts displayed in the dropdown are the different XXXX found.

If it is blank; no files were found.

Make sure the files are in the directory DIR_FS_CATALOG_MODULES.'UHtmlEmails/

Actually, BBEdit does a great job as well.

Anyway, I found the problem. I'm on 1.1 DuHuh

#28   SimpleSi

SimpleSi
  • Members
  • 20 posts
  • Real Name:Simon
  • Gender:Male
  • Location:UK, Midlands

Posted 29 March 2008 - 21:45

Hello nice work with this but I am only receiving html emails when using "Cash on delivery, cheque or postal orders"
If a customer pays via paypal or protx the get a normal text email.
Im have tried with both supplied layouts.

Also with development mode = True. And pay by cheque/postal order i get this error....
Warning: fopen(Last_mail_from_checkout_process.php.htm) [function.fopen]: failed to open stream: Permission denied in /home/ians/public_html/checkout_process.php on line 297
can't open error log file

Am I doing something wrong, I have gone through the install.txt twice and checked all files and everything seems fine.
I updated the database via phpmyadmin

#29   SimpleSi

SimpleSi
  • Members
  • 20 posts
  • Real Name:Simon
  • Gender:Male
  • Location:UK, Midlands

Posted 30 March 2008 - 03:24

Right I checked again and found I had made a mistake with inserting some code...

MODIFY THE FILE catalog/admin/orders.php

########		  FIND		   ########

if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) {
			  $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";
	}
I inseted BEFORE the last bracket /blush.gif' class='bbc_emoticon' alt=':blush:' />

Everything works now, "Order Process" emails are in HTML form from Protx and Cheque/Postal orders BUT bloody Paypal is still playing up.
If someone pays using Paypal and completes the checkout process. The "Order Process" is in normal text form.
If I update that orders status though the email is sent in HTML.

I am using PayPal_Shopping_Cart_IPN_v3.1.4 by the way

Crazy

Edited by SimpleSi, 30 March 2008 - 03:27.


#30   dealwititp

dealwititp
  • Members
  • 46 posts
  • Real Name:Walt
  • Gender:Male
  • Location:Detroit, MI

Posted 31 March 2008 - 17:23

SimpleSi,

I am having the sample problem as you with getting the contrib to work with PayPal IPN. After researching this forum and no finding a direct answer, I found that by applying the following changes to the ipn.php file located in catalog/ext/modules/payment/paypal_ipn/ipn.php.

Find:
[codebox] $email_order = STORE_NAME . "\n" .
[/codebox]

Insert this on the line above:
[codebox]// EOF content type fix by AlexStudio
// $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class
//--- Beginning of addition: Ultimate HTML Emails ---//
if (EMAIL_USE_HTML == 'true') {
require(DIR_WS_MODULES . 'UHtmlEmails/checkout_process_'. ULTIMATE_HTML_EMAIL_LAYOUT .'.php');
$email_order = $html_email;
}else{//Send text email
//--- End of addition: Ultimate HTML Emails ---//
$order = new order($insert_id);
[/codebox]

The line $order = new order($insert_id); may not be necessary. I added from another mod, I think. Just delete it if it doesn't work for you.

Find:
[codebox] tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
[/codebox]

Insert this on the line above:
[codebox]//--- 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_checkout_process.php.htm';
$TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file");
fwrite($TheFileHandle, $email_order);
fclose($TheFileHandle);
}
//--- End of addition: Ultimate HTML Emails ---// [/codebox]

This will generate the HTML email when the paypal ipn is used for checkout, however I'm now having a problem getting my order number to display. If any has an idea of why this is happening, I'm all ears. Also note that I am using PayPal IPN v2.3.3.

Thanks,
Walt

#31   danta67

danta67
  • Members
  • 52 posts
  • Real Name:dan

Posted 31 March 2008 - 18:07

hi there
i really love this contri and is working great but on some products we use product atributes options if the order comes in the email looks fine but didnt add the product attributes right its mixed up

any help
danta67 fixed it my mistake

Edited by danta67, 31 March 2008 - 18:19.


#32   SimpleSi

SimpleSi
  • Members
  • 20 posts
  • Real Name:Simon
  • Gender:Male
  • Location:UK, Midlands

Posted 31 March 2008 - 23:18

Thanks for the reply dealwititp
But I am using a different version on IPN than you and dont have the paypal_ipn file.

Thanks again.

#33   cornishpirate

cornishpirate
  • Members
  • 122 posts
  • Real Name:Alan
  • Location:Cornwall, England

Posted 02 April 2008 - 08:26

Any plans to incorporate Notifications & Tell a Friend?

After the beauty of U HTML, plain text is ugly !!!!!!!!

#34   Olof Larsson

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

Posted 02 April 2008 - 11:30

SimpleSi,

I am having the sample problem as you with getting the contrib to work with PayPal IPN. After researching this forum and no finding a direct answer, I found that by applying the following changes to the ipn.php file located in catalog/ext/modules/payment/paypal_ipn/ipn.php.

Find:

$email_order = STORE_NAME . "\n" .

Insert this on the line above:
// EOF content type fix by AlexStudio// $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class//---  Beginning of addition: Ultimate HTML Emails  ---//if (EMAIL_USE_HTML == 'true') {	require(DIR_WS_MODULES . 'UHtmlEmails/checkout_process_'. ULTIMATE_HTML_EMAIL_LAYOUT .'.php');	$email_order = $html_email;}else{//Send text email//---  End of addition: Ultimate HTML Emails  ---//          $order = new order($insert_id);

The line $order = new order($insert_id); may not be necessary. I added from another mod, I think. Just delete it if it doesn't work for you.

Find:

Insert this on the line above:
//---  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_checkout_process.php.htm';	$TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file");	fwrite($TheFileHandle, $email_order);	fclose($TheFileHandle);}//---  End of addition: Ultimate HTML Emails  ---//

This will generate the HTML email when the paypal ipn is used for checkout, however I'm now having a problem getting my order number to display. If any has an idea of why this is happening, I'm all ears. Also note that I am using PayPal IPN v2.3.3.

Thanks,
Walt


If you take a look at your module DIR_WS_MODULES . 'UHtmlEmails/checkout_process_'. ULTIMATE_HTML_EMAIL_LAYOUT .'.php you will find that the variable supposed to contain the order number is called: $insert_id
This variable is normaly set in checkout_process.php but if you are running this module from another file you should make sure to set this variable in that document. This goes for all variables in the module. You should check that they all exist in the file in which you include the module.

Regards, Olof

#35   Olof Larsson

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

Posted 02 April 2008 - 11:33

hi there
i really love this contri and is working great but on some products we use product atributes options if the order comes in the email looks fine but didnt add the product attributes right its mixed up

any help
danta67 fixed it my mistake


Hi Danta,
Thank you for liking my contribution /laugh.gif' class='bbc_emoticon' alt=':lol:' />
Would you please describe your error more in detail. Please include as much information as possible so I can help you.
Or have you solved this problem of yours allready?

Regards, Olof

#36   Olof Larsson

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

Posted 02 April 2008 - 11:37

Any plans to incorporate Notifications & Tell a Friend?

After the beauty of U HTML, plain text is ugly !!!!!!!!


Well this is a good idea. "Password fogotten" emails should allso be covered. If I get any freetime from school I will most truly fix this. The plugin should cover all emails sent from the store, not only the most important ones. This makes sense.

#37   oenka

oenka
  • Members
  • 25 posts
  • Real Name:Alex

Posted 08 April 2008 - 06:53

Great contribution!! Works perfectly. I only have a guestion about U HTML Emails in combination with Paypal IPN.

Does anybody know how to put the Firstname, lastname, shippingcost + total amount in the e-mail in combination with Paypal IPN ?

Thx in advanced

#38   SimpleSi

SimpleSi
  • Members
  • 20 posts
  • Real Name:Simon
  • Gender:Male
  • Location:UK, Midlands

Posted 08 April 2008 - 15:51

Great contribution!! Works perfectly. I only have a guestion about U HTML Emails in combination with Paypal IPN.

Does anybody know how to put the Firstname, lastname, shippingcost + total amount in the e-mail in combination with Paypal IPN ?

Thx in advanced


Which Paypal_IPN contrib are you using ?

#39   oenka

oenka
  • Members
  • 25 posts
  • Real Name:Alex

Posted 09 April 2008 - 06:54

I`m using PayPal IPN v2.3.3.

Everything works great accept Firstname, lastname, shippingcost + total amount.

Edited by oenka, 09 April 2008 - 06:54.


#40   baderbnk

baderbnk
  • Members
  • 1 posts
  • Real Name:bader

Posted 10 April 2008 - 02:09

Hi I have a problem, do not modify DATABASE CHANGES
Run the 'Install.sql' file, for example using phpMyadmin.
This will create the configuration keys:
"E-mail Options" -> "Html Email Layout"
"E-mail Options" -> "Development mode"
Where I find the file and as install.sql change?

I have on my server installed directadminv1

Thanks