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;
Bookmarks