-
Common Email Styling [Support Thread]
This plugin modifies the way that HTML emails are processed by your store:
- Consolidated CSS file that applies to all email templates
- HTML email logo information specified once (well, twice since there's a store-side and an admin-side file). No more editing thirteen separate templates to get a new logo file included!
- Enabled for responsive email views
https://www.zen-cart.com/downloads.php?do=file&id=2028
-
Re: Common Email Styling [Support Thread]
:clap::clap::clap::thumbsup: Thanks, this makes me a happy camper.
-
Re: Common Email Styling [Support Thread]
Happy campers are good! Here's the download link, which will be active once the plugin has been reviewed: https://www.zen-cart.com/downloads.php?do=file&id=2028
-
Re: Common Email Styling [Support Thread]
I think I am gonna stop working on my projects and just send you my wishlist
-
Re: Common Email Styling [Support Thread]
I downloaded it from your website and took a look, very nice.
-
Re: Common Email Styling [Support Thread]
Which email clients (and versions) has this been tested with ... both PC/device-based and browser-based?
The reason the CSS was put into each individual template was to deal with serious incompatibilities across clients.
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
lat9
No more editing thirteen separate templates to get a new logo file included!
One never needed to edit any templates for the logo file. Just name the logo file to suit what's already in the templates.
Just sayin.
Granted, if you had a legitimate reason to change the file "extension" that would have posed a small complication.
-
Re: Common Email Styling [Support Thread]
Dr. Byte. I looked at the module already and the css gets inlined in the header when sent.
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
DrByte
Which email clients (and versions) has this been tested with ... both PC/device-based and browser-based?
The reason the CSS was put into each individual template was to deal with serious incompatibilities across clients.
Like barco57 indicated, the CSS-file's contents are "in-lined" in the emails' HTML. The primary difference here is that each email contains all the styling rules.
Quote:
Originally Posted by
DrByte
One never needed to edit any templates for the logo file. Just name the logo file to suit what's already in the templates.
Just sayin.
Granted, if you had a legitimate reason to change the file "extension" that would have posed a small complication.
Since I was mucking with the template-files anyway, I figured that this was a good time to also make the email header-image customizable as well to give store-owners a choice in the image file-type -- while recognizing, hopefully, that .png images might not be displayable on all email engines.
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
lat9
Like barco57 indicated, the CSS-file's contents are "in-lined" in the emails' HTML. The primary difference here is that each email contains all the styling rules.
Fair. I've been contemplating merging/inlining all the styles one day, so I'm glad to see it tackled.
-
Re: Common Email Styling [Support Thread]
G'day,
This plugin comes out of customisation work lat9 has been doing for me on the online dive shop at https://www.scubadoctor.com.au/diveshop/
We've gone through and totally revised all of the site's email content plus made mods to do things like: include social media icons, and highlight 'non-standard' details of orders in the admin emails to help improve back-end workflow.
We're just about to finalise making access to a tax invoice that meets Australian Tax Office requirements available to customers via the Order Confirmation email. (It's already working from the Order Information page.)
Plus the emails now pass HTML validation, which helps with displaying them in some email readers.
Best regards, Lloyd Borrett.
-
Re: Common Email Styling [Support Thread]
v1.0.0 of the plugin is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2028
Please note that this plugin simply
- moves all CSS styling to a (later in-lined) CSS file
- moves the specification of the logo's file information to a common language file
- adds an HTML id= tag to each template's <body> tag
- adds a <meta> viewport tag to each template's <head> section
Some of the other changes that Lloyd refers to, like the emails now passing HTML validation, are specific to his site's customizations.
-
Re: Common Email Styling [Support Thread]
My mouse blows bubbles on your site. Very cool. Glen Iris.
Quote:
Originally Posted by
lloyd_borrett
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
lat9
v1.0.0 of the plugin is now available for download:
https://www.zen-cart.com/downloads.php?do=file&id=2028
Please note that this plugin simply
- moves all CSS styling to a (later in-lined) CSS file
- moves the specification of the logo's file information to a common language file
- adds an HTML id= tag to each template's <body> tag
- adds a <meta> viewport tag to each template's <head> section
Some of the other changes that Lloyd refers to, like the emails now passing HTML validation, are specific to his site's customizations.
You rock!!!
-
Re: Common Email Styling [Support Thread]
Years ago, I took the time to update all 13 email templates so that they were all consistent in look/feel.. Today I took those same changes and applied them to ONE FILE, and got treated to INSTANT gratification applied to ALL 13 email templates.. (all without spilling a drop of my delicious wine :laugh:)
Thanks lat9 for an AWESOME module!!
One question.. One thing I could never quite figure out is how to add the store address and/or phone/fax from the store's configuration information just below the logo. Any hints on how to do this??
-
Re: Common Email Styling [Support Thread]
Thanks, Diva. That was exactly the problem that was solved by this plugin. Lloyd (@lloyd_borrett) had tasked me with getting the same look-and-feel in all the emails sent by his shop and I could see myself applying each incremental change to 13 email templates (not my idea of a fun time). Pulling the CSS out to a separate file allowed me, like you, to make those incremental changes in one place!
One way to add extra header information (I'll note the change request in the plugin's GitHub repository) would be to update each of the templates adding the highlighted element to the email's logo area:
Code:
<!-- 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>
Then, update the files /YOUR_ADMIN/includes/languages/english/email_extras.php and /includes/languages/english/YOUR_TEMPLATE/email_extras.php, adding:
Code:
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');
define ('EMAIL_EXTRA_HEADER_INFO', '<div>Extra stuff for header</div>');
Finally, update the zen_mail function to pull that information in to all email templates:
Code:
if (!isset ($block['EMAIL_LOGO_ALT_TEXT']) || $block['EMAIL_LOGO_ALT_TEXT'] == '') $block['EMAIL_LOGO_ALT_TEXT'] = EMAIL_LOGO_ALT_TITLE_TEXT;
if (!isset ($block['EMAIL_LOGO_WIDTH']) || $block['EMAIL_LOGO_WIDTH'] == '') $block['EMAIL_LOGO_WIDTH'] = EMAIL_LOGO_WIDTH;
if (!isset ($block['EMAIL_LOGO_HEIGHT']) || $block['EMAIL_LOGO_HEIGHT'] == '') $block['EMAIL_LOGO_HEIGHT'] = EMAIL_LOGO_HEIGHT;
if (!isset ($block['EXTRA_HEADER_INFO']) || $block['EXTRA_HEADER_INFO'] == '') $block['EXTRA_HEADER_INFO'] = EMAIL_EXTRA_HEADER_INFO;
-
Re: Common Email Styling [Support Thread]
Joy fills the world and happiness abounds! Thanks Lat, you rock!!!
-
Re: Common Email Styling [Support Thread]
Will this work on zen cart v1.5.1?
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
countrycharm
Will this work on zen cart v1.5.1?
Yes, but you'll need to merge the core-file changes to /includes/functions/functions_email.php (the plugin uses ZC 1.5.4 as its basis for any core-file modifications, and there were significant changes in functions_email.php between v1.5.1 and 1.5.4).
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
lat9
Thanks, Diva. That was exactly the problem that was solved by this plugin. Lloyd (@lloyd_borrett) had tasked me with getting the same look-and-feel in all the emails sent by his shop and I could see myself applying each incremental change to 13 email templates (not my idea of a fun time). Pulling the CSS out to a separate file allowed me, like you, to make those incremental changes in one place!
No it was NO fun.. which is why I saved the work I had done to reuse for other clients.. This was LOADS easier!!!
Quote:
Originally Posted by
lat9
One way to add extra header information (I'll note the change request in the plugin's GitHub repository) would be to update
each of the templates adding the highlighted element to the email's logo area:
Code:
<!-- 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>
Then, update the files /YOUR_ADMIN/includes/languages/english/email_extras.php and /includes/languages/english/YOUR_TEMPLATE/email_extras.php, adding:
Code:
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');
define ('EMAIL_EXTRA_HEADER_INFO', '<div>Extra stuff for header</div>');
Finally, update the zen_mail function to pull that information in to
all email templates:
Code:
if (!isset ($block['EMAIL_LOGO_ALT_TEXT']) || $block['EMAIL_LOGO_ALT_TEXT'] == '') $block['EMAIL_LOGO_ALT_TEXT'] = EMAIL_LOGO_ALT_TITLE_TEXT;
if (!isset ($block['EMAIL_LOGO_WIDTH']) || $block['EMAIL_LOGO_WIDTH'] == '') $block['EMAIL_LOGO_WIDTH'] = EMAIL_LOGO_WIDTH;
if (!isset ($block['EMAIL_LOGO_HEIGHT']) || $block['EMAIL_LOGO_HEIGHT'] == '') $block['EMAIL_LOGO_HEIGHT'] = EMAIL_LOGO_HEIGHT;
if (!isset ($block['EXTRA_HEADER_INFO']) || $block['EXTRA_HEADER_INFO'] == '') $block['EXTRA_HEADER_INFO'] = EMAIL_EXTRA_HEADER_INFO;
Outstanding.. Will apply these changes.. Thanks again!! You are the best!!!
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
lloyd_borrett
........We've gone through and totally revised all of the site's email content plus made mods to do things like: include social media icons, and highlight 'non-standard' details of orders in the admin emails to help improve back-end workflow.
We're just about to finalise making access to a tax invoice that meets Australian Tax Office requirements available to customers via the Order Confirmation email. (It's already working from the Order Information page.).......
Yesssss!!! Can't wait for these changes - saves a lot of paper printing invoices and including them in the order package. Incidentally, just looked at the invoice issue yesterday and thought "need to tackle this!!"
Thanks guys!
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
frank18
Yesssss!!! Can't wait for these changes - saves a lot of paper printing invoices and including them in the order package. Incidentally, just looked at the invoice issue yesterday and thought "need to tackle this!!"
Thanks guys!
You can see examples of the Tax Invoice and new emais in the thread https://www.zen-cart.com/showthread....e-a-Difference
-
Re: Common Email Styling [Support Thread]
In email /email/email_common.css I noted that line 38 reads
Quote:
.delivery_block, .billing_block { width: 50%; vertical-align: top; }
guess that should be
Quote:
.delivery-block, .billing-block { width: 50%; vertical-align: top; }
-
Re: Common Email Styling [Support Thread]
Thanks for the report, frank18. I've added that issue to the plugin's GitHub repository (https://github.com/lat9/common_email_styling/issues/2)
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
lloyd_borrett
Thanks for that Lloyd!
-
Re: Common Email Styling [Support Thread]
I just uploaded v1.1.0 to the plugins area for review:
- BUGFIX: Correct "misspelling" in CSS file
- CHANGE: Add the capability to insert an additional HTML block in each email's header area.
-
Re: Common Email Styling [Support Thread]
v1.1.0 is now available for download from the Plugins area.
-
Re: Common Email Styling [Support Thread]
I've hit an issue and am wondering if anyone has an answer.
When sending an email to Gmail addresses (and presumably some others), the styling isn't applied.
I believe I installed everything correctly because the styling can be seen in the email 'original' version. It just seems that Gmail scrubs any styling that isn't inline (I tested putting it inline and it worked.)
Thanks.
-
Re: Common Email Styling [Support Thread]
I've read of issues with the way that gmail handles HTML emails. That said, this plugin makes no change in the way that an email is "presented" to an email viewer like gmail.
The primary change that this plugin introduces is moving the CSS styling specifications from each HTML email template to a separate file, allowing that single file to be updated with all styling needed for all emails. That CSS file's contents are then read and placed into a <style> tag in the email's header (kind of like using an @import statement to pull an additional CSS).
Just like the built-in Zen Cart's HTML emails, there is no in-line styling on the HTML tags other than the specification of a class= attribute that references a collection of styles to be applied.
-
Re: Common Email Styling [Support Thread]
I ended up just utilizing inline styles.
Gave me the chance to really look at the email content as well and decide how I wanted to change it.
-
Re: Common Email Styling [Support Thread]
Do you have some screenshots how the emails will look like?
Thanks
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
ShopVille
Do you have some screenshots how the emails will look like?
Thanks
Out the box they look like the default emails (colors, fonts, etc..) The DIFFERENCE is that the formatting is consistent across ALL the various outbound emails (the default emails do not all have the same content/format), and you can manage the look/feel using ONE style stylesheet..
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
DivaVocals
Out the box they look like the default emails (colors, fonts, etc..) The DIFFERENCE is that the formatting is consistent across ALL the various outbound emails (the default emails do not all have the same content/format), and you can manage the look/feel using ONE style stylesheet..
Gotcha, does someone have a nice css styling to share? perhaps we should create another thread where people could share theyur css if they wish?
-
Re: Common Email Styling [Support Thread]
Using this support-thread to post customized email CSS files sounds like a wonderful idea!
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
lat9
Using this support-thread to post customized email CSS files sounds like a wonderful idea!
:dontgetit
i have 2 definitions for wonderful....
1.
excellent; great; marvelous:
2.
of a sort that causes or arouses wonder; amazing; astonishing:
-
Re: Common Email Styling [Support Thread]
I've reviewed the plugin's files for compatibility with Zen Cart v1.5.5 ... but wait! Its functionality is included in Zen Cart v1.5.5! :D
-
Re: Common Email Styling [Support Thread]
Thank you very much for your contribution. This solved the problem in my mails:
$EMAIL_LOGO_ALT_TEXT $EXTRA_HEADER_INFO
and
$EXTRA_HEADER_INFO
I just downloaded it and uploaded it to my site and it worked perfect. I am very grateful to you.
-
Re: Common Email Styling [Support Thread]
Hi All,
Will this module work with zencart version 1.58A?
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
Bruce1952
Hi All,
Will this module work with zencart version 1.58A?
Not needed; it's been in-core since v1.5.5.
-
Re: Common Email Styling [Support Thread]
I updated the plugin description to indicate this.
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
lat9
Not needed; it's been in-core since v1.5.5.
OK that's good but where can you edit and view the edit that you have done.
I have been looking but can't find where in admin you can edit the file for the different emails listed in the module.
-
Re: Common Email Styling [Support Thread]
Quote:
Originally Posted by
Bruce1952
OK that's good but where can you edit and view the edit that you have done.
I have been looking but can't find where in admin you can edit the file for the different emails listed in the module.
No, there isn't a way to do that in Admin. It would be a combination of using a text editor to edit code in the files I mentioned together with previewing those edits using the plugin I mentioned.
EDIT: I replied to the wrong thread, see my previous response here - https://www.zen-cart.com/showthread....07#post1400307