Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Email Header not showing

Email Header not showing

Views: 1,587

Results 1 to 10 of 10
30 Jun 2016, 8:10 AM
#1
kcin avatar

kcin

New Zenner

Join Date:
Jan 2014
Location:
Florida
Posts:
39
Plugin Contributions:
0

Email Header not showing

When I send an email from the Admin panel, the image doesn't render in the email. I get the generic missing picture icon. I have updated the header.jpg file to my own, it is definitely there, I have verified it's path in the browser.

I looked in the email templates and for those of you who already know this stuff, it appears that the image source is stored in a variable container of some sort.

src="$EMAIL_LOGO_FILE"

I used the developers toolkit to try to find that text in any file, and it was nowhere other than the email themselves. I thought for sure this would be ste in the CSS file, but no. Where can I find where the path for that image is stored so that I can check and/or fix it as necessary?

30 Jun 2016, 4:39 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Email Header not showing

You probably didn't update the email_extras.php language file in your admin when you upgraded.

There are two:

  • /your_admin_folder/includes/languages/english/email_extras.php
  • /includes/languages/english/email_extras.php
30 Jun 2016, 6:11 PM
#3
kcin avatar

kcin

New Zenner

Join Date:
Jan 2014
Location:
Florida
Posts:
39
Plugin Contributions:
0

Re: Email Header not showing

so if I don't have something in either of those php files, what do I need to add to it in order to get my header image working?

I tried this based on what I saw in the file already, but it didn't work. Yes, I verified that the path works.

define('EMAIL_LOGO_FILE','http://MYDOMAIN.com/email/header.jpg');
30 Jun 2016, 6:31 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: Email Header not showing

At the top of the as-shipped versions of the admin and storefront email_extras.php language file, you'll see the following definitions:

  define ('EMAIL_LOGO_FILENAME', 'header.jpg');  //-File is present in /email folder
  define ('EMAIL_LOGO_WIDTH', '550');
  define ('EMAIL_LOGO_HEIGHT', '110');
  define ('EMAIL_LOGO_ALT_TITLE_TEXT', 'Zen Cart! The Art of E-commerce');

Those constants are used by the zen_mail function, present in /includes/functions/functions_email.php to insert those values into the appropriate spots within your email templates.

30 Jun 2016, 8:51 PM
#5
kcin avatar

kcin

New Zenner

Join Date:
Jan 2014
Location:
Florida
Posts:
39
Plugin Contributions:
0

Re: Email Header not showing

Interesting. I wonder what I did that overwrote those values. Thanks!

1 Jul 2016, 3:12 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: Email Header not showing

Kcin:

Interesting. I wonder what I did that overwrote those values. Thanks!
Probably using language files from an older version of Zen Cart.

9 Dec 2016, 8:49 AM
#7
jpirie avatar

jpirie

New Zenner

Join Date:
Apr 2015
Location:
Assynt, North West Highlands of Scotland
Posts:
24
Plugin Contributions:
0

Re: Email Header not showing

Good Morning all,
I'm another one of those pesky, "The same thing is happening to me" folk and, because I am acutely aware that this is annoying to the clever people who patiently help us, I have spent the past 48 odd hours going through all of the more up to date threads on this issue to no avail.
I have finally decided that this thread is the most relevant and have just finished checking all of the detail in this is correct on my site..which it is.

I get emails with a pretty weird header, which is not an image!
I am attaching an image file of one such test email for your entertainment :) Also, the html source code from that email at the end of this post.

Sine it is apparent that there have been a lot of changes to this email header setup it's been quite complicated picking out the right from the wrong but, what I do know is that the image is definitely present and linkable whether or not that is still relevant?
Also, it used to work fine and I suspect something occurred after I tried to do a direct ftp comparison using "Beyond Compare" linux. This discovered many orphaned files etc and I then synchronised those. This however coould be a red herring and the mail logo may already have failed.
The shop is very new and so we have not had time to get much feedback on Emails. They are certainly working but just this odd malformed email header issue.

If anyone can see a glaringly obvious issue please please do get in touch :)

Thanks
James

E.MAil source pasted below....

Content-Type: text/html; charset=us-ascii

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <base href="http://shake-the-tree.com/" /> <style type="text/css"> $EMAIL_COMMON_CSS </style> </head> <body id="direct_mail"> <div class="holder"> <!-- Header Section --> <div class="header"> <img src="$EMAIL_LOGO_FILE" alt="$EMAIL_LOGO_ALT_TEXT" title="$EMAIL_LOGO_ALT_TEXT" width="$EMAIL_LOGO_WIDTH" height="$EMAIL_LOGO_HEIGHT" border="0" /> $EXTRA_HEADER_INFO </div> <!-- Content Section --> <div class="content"> <div>Dear James Pirie</div> <div>None</div> </div> <!-- Footer Section --> <div class="footer"> <div class="copyright">Copyright (c) 2016 <a href="http://www.zen-cart.com" target="_blank">Zen Cart</a>. Powered by <a href="http://www.zen-cart.com" target="_blank">Zen Cart</a></div> </div> </div> <div class="disclaimer"> <div class="disclaimer1"> This email address was given to us by you or by one of our customers. If you feel that you have received this email in error, please send an email to <a href="mailto:[email protected]">[email protected] </a></div> <div class="disclaimer2">This e-mail is sent in accordance with the US CAN-SPAM Law in effect 01/01/2004. Removal requests can be sent to this address and will be honored and respected.</div> </div> </body> </html>
9 Dec 2016, 3:31 PM
#8
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,956
Plugin Contributions:
8

Re: Email Header not showing

i would check:

includes/functions/functions_email.php

the use of a common css for email is relatively new; and it gets established in the above referenced script. i show it having been modified for version 1.5.5. i would ensure that script is up-to-date.

good luck!

9 Dec 2016, 4:50 PM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: Email Header not showing

Also, see my post (#4 in this thread) and make sure that those constants are properly (a) present and (b) set to identify the logo that you want.

I'll echo @carlwhat's post above, it's quite likely that you've preserved an older version of the functions_email.php function file.

10 Dec 2016, 7:56 AM
#10
jpirie avatar

jpirie

New Zenner

Join Date:
Apr 2015
Location:
Assynt, North West Highlands of Scotland
Posts:
24
Plugin Contributions:
0

Re: Email Header not showing

Good Morning again,
Total Genius that's what you all are :)
I suspect when I did my comparison using "Beyond Compare" that somehow an older version of the file in question, includes/functions/functions_email.php
became substituted for the new one! No idea how though as I've been using v 1.5.5a from the outset!

If there is one part of Zen cart that I find distressing it's the upgrade process because of all the file-comparisons.

I do want to upgrade to 1.5.5b but I am very hesitant to do so. I'll read some of the tutorials and make a decision.

In the meantime...thank you seems such a little phrase to express the relief I am experiencing :)

James