Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Changing gift certificate email to html as standard?

Changing gift certificate email to html as standard?

Locked

Views: 5,123

Results 1 to 20 of 21
This thread is locked. New replies are disabled.
1 Dec 2008, 12:06 PM
#1
ladygodiva avatar

ladygodiva

New Zenner

Join Date:
Oct 2006
Posts:
52
Plugin Contributions:
0

Changing gift certificate email to html as standard?

Hi is there anywhere in the code i can change the default gift certificate mail to html? I only found one other thread on this pointing out that all new customer emails were sent in plain text. Can i ammend this?

I definitely prefer if somebodies spending money on these that they get a nice looking email about it, as the plain text could easily be dismissed as spam.

1 Dec 2008, 4:26 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Changing gift certificate email to html as standard?

I delete emails from places that send me HTML when I tell them TEXT emails ...

Have you tested this out, after enabling the HTML emails in the Configuration ... Emails ...

Use MIME HTML When Sending Emails
Send e-mails in HTML format

true
false

And try setting that to true ... then create an account as a customer for TEXT emails and a customer with HTML emails and see the difference in how the emails work on all of the features? :smile:

1 Dec 2008, 5:26 PM
#3
ladygodiva avatar

ladygodiva

New Zenner

Join Date:
Oct 2006
Posts:
52
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

Hi thank you for the reply :)

At present i would, and i think my customers when paying for a email/virtual gift certificate would like your recipient to recieve a nice looking email that isn't in plain text. But thats just my thoughts on it and has made me put on hold my gift certificate idea.

I've changed the settings to html from the admin-config and as i think it was you who said in a previous thread on the topic: If zencart is set up to send gift certificates to customers who's preference is unknown, then surely you can chage the preference to be automically html somewhere?

I was wondering if anyone else had noticed this though? I fell into the trap of when testing these out with my own account was getting all the emails in html i designed, got ready to launch them and when i tested them on a friend, it was just plain text.

1 Dec 2008, 5:33 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

You only have PARTIAL control of the e-mail format - and you must be careful here...

I (like Ajeh) choose to receive my emails as plain text - it's a setting I CHOOSE MYSELF on my e-mail client.

So if you send me a HTML email ONLY, then it's likely to arrive garbled, or in plain text.

This is why ZC provides both options to configure and send out e-mail... so that when it gets to the adressee, it arrives in a format that can be rendered according to the user's preference - not yours!

1 Dec 2008, 5:35 PM
#5
ladygodiva avatar

ladygodiva

New Zenner

Join Date:
Oct 2006
Posts:
52
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

Yes but if a users preference is unknown (i.e a unkown new customer) then you are choosing their preference as plain text. I'd rather have a option for html as a default than not. But of course i am taking into account the variables of different email providors. It's a risk i am willing to take, and thus want to know where i can change the default preference to html.

1 Dec 2008, 5:38 PM
#6
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

See Ajeh's post - she shows you the settings.

You have NO CONTROL over how a person chooses to receive e-mail as the setting is not done via an e-mail provider but on the user's e-mail client (ie: the software - such as MS Outlook - on their own computer).

1 Dec 2008, 5:58 PM
#7
ladygodiva avatar

ladygodiva

New Zenner

Join Date:
Oct 2006
Posts:
52
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

You seem to be missing my point. A persons email client has nothing to do with how gift certificate email is sent in zencart.

As was stated in a previous post:

if the use does not have a account with the store, the email is sent in plain text

If the uses does have a email account with the store then the email gets sent as their preference (i.e all my customers are subscribed to html) THEN it will be transferred by email client to plain text or let through as html.

Therefore, the zencart programme is sending the gift certificates to unknown customesr as plain text, and this is what i keep on asking if it can be changed. Your email client has nothing to do with the question i am asking.

Anybody other than fairestcape want to have a stab at this?

1 Dec 2008, 6:19 PM
#8
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

My point is entirely valid... and posts by others will be no different.

Ajeh's post shows you how to default Zencart to send HTML emails - and if your customer has chosen to receive HTML, then that's how it will arrive... if not, they will get Text...

... simple as that.

1 Dec 2008, 6:20 PM
#9
ladygodiva avatar

ladygodiva

New Zenner

Join Date:
Oct 2006
Posts:
52
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

Any chance you can change your entire tone of your replies? This is supposed to be a helpful place.

Firstly, you are talking about customers, and customers email settings from their providor or zencart prefernce.

I am talking about zencarts default plain text setting for NON customers when sending gift certificates. How is that the same thing? And how can i change that. If it is set to plain text, then you must be able to CHANGE that setting to html. Oui?

A plain text setting is a setting in the files somewhere. As it sets the non customers to get PLAIN i want to change this to html.

I have fully read what you have written numerous times, and would like some other input on this from another person since you are doing nothing but repeat yourself.

1 Dec 2008, 6:28 PM
#10
ladygodiva avatar

ladygodiva

New Zenner

Join Date:
Oct 2006
Posts:
52
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

This is a gift certificate issue only and not a general email enquiry or interest in changing any OTHER email settings.

1 Dec 2008, 6:36 PM
#11
ladygodiva avatar

ladygodiva

New Zenner

Join Date:
Oct 2006
Posts:
52
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

And also because i am now being told this is like rocket science that is incomprehendable (?) here is a run down:

Gift Certificate for non customers = plain text emails as standard

Plain text emails to non customers must therefor be a command in the zencart files somewhere to achieve this

How do i change than setting to html.

1 Dec 2008, 8:00 PM
#12
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

How many times does it have to be said...

Linda showed you how:

Admin>>>configuration>>>Email Options

**Use MIME HTML When Sending Emails
Send e-mails in HTML format

true
false **

1 Dec 2008, 8:38 PM
#13
ladygodiva avatar

ladygodiva

New Zenner

Join Date:
Oct 2006
Posts:
52
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

How many times do i have to reply saying i have done all of those things?? I am amazed you both seem to be way off the mark. Here's the quote from my actual reply to Linda, learn to read in future please:

I've changed the settings to html from the admin-config

Seem the issue may lie in the phpmailer file located here. This is the only file issue i can find that would set a email specifically to plain/text

public_html/shop/includes/classes/class.phpmailer.php

Line #48 : var $ContentType = "text/plain";

Line #245 : $this->ContentType = "text/plain";

Line #870 : "text/plain", "");

Line #900 : "text/plain", "") . $this->LE;

In future please get a clue before being rude about a issue either of you clearly have no knowledge of. Either that or read my replies fully.

1 Dec 2008, 8:46 PM
#14
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

Around line 245, do you have the following?

  /**
     * Sets message type to HTML.  
     * @param bool $bool
     * @return void
     */
  function IsHTML($bool) {
    if($bool == true)
    $this->ContentType = "text/html";
    else
    $this->ContentType = "text/plain";
  }

(PS: what version of ZC are you using?)

1 Dec 2008, 8:52 PM
#16
ladygodiva avatar

ladygodiva

New Zenner

Join Date:
Oct 2006
Posts:
52
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

And yes its exactly the same. This was all i was meaning about zencart setting the non customer gift certificates to plain/text and a simple way around it.

So is this the file, and would you change the variables to html/text?

I'm also using 1.3.7

1 Dec 2008, 9:24 PM
#17
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

You may get some pointers HERE

3 Dec 2008, 11:23 AM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Changing gift certificate email to html as standard?

ladygodiva, while their points are valid in the context in which they've read the message and their understanding of what can be done, it's clear everyone reading your requests has totally missed your specific point, or they don't know how to adjust its operation. And that's fine ... for them.

The email capability has intentionally been written to force outbound messages for non-customers to TEXT format ... for the reasons discussed above, and a few others.

However, that doesn't mean you can't change it for your site specifically.

So, here goes, but with a disclaimer first, in case people following along foolishly think this is a smart way to put on a bandage but end up shooting themselves in the foot instead ...

**DO NOT DO THIS IF YOU'RE LOOKING FOR A BLANKET "FIX" to get HTML messages sending from your site. If you're not getting HTML emails, you're looking in the WRONG PLACE.

LOOK HERE INSTEAD: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Email_Problems **

To force outgoing GV emails to be in HTML mode regardless of customer preference, find line 120 in your /includes/functions/functions_email.php file, where the following section of code appears, and insert the highlighted lines as shown:```
//determine what format to send messages in if this is an "extra"/admin-copy email:
if (ADMIN_EXTRA_EMAIL_FORMAT == 'TEXT' && substr($module,-6)=='_extra') {
$email_html=''; // just blank out the html portion if admin has selected text-only mode
}
[B]
if ($customers_email_format != 'HTML' && $email_html != '' && ($module == 'gv_send' || $module == 'gv_mail')) {
$customers_email_format = 'HTML';
}
[/B]

//notifier intercept option
$zco_notifier->notify('NOTIFY_EMAIL_AFTER_EMAIL_FORMAT_DETERMINED');

6 Dec 2008, 9:21 PM
#19
donplay avatar

donplay

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

I tried this and it worked like a charm...thanks, DrByte!

20 Apr 2009, 3:01 PM
#20
orchidlake avatar

orchidlake

New Zenner

Join Date:
Dec 2008
Location:
Florida
Posts:
50
Plugin Contributions:
0

Re: Changing gift certificate email to html as standard?

thank you!!! thank you!!! thank you DrByte!!!