Results 1 to 10 of 42

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,940
    Plugin Contributions
    96

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

  2. #2
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Common Email Styling [Support Thread]

    Joy fills the world and happiness abounds! Thanks Lat, you rock!!!

  3. #3
    Join Date
    Jul 2007
    Posts
    2,169
    Plugin Contributions
    16

    Default Re: Common Email Styling [Support Thread]

    Will this work on zen cart v1.5.1?
    Is your site Upgraded to the current version 1.5.4 Yet?
    zencart-upgrades-website-installation

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,940
    Plugin Contributions
    96

    Default Re: Common Email Styling [Support Thread]

    Quote Originally Posted by countrycharm View Post
    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).

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Common Email Styling [Support Thread]

    Quote Originally Posted by lat9 View Post
    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 View Post
    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!!!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. v150 Product Images on Invoice, Email, etc [Support Thread]
    By jackie.taferner in forum All Other Contributions/Addons
    Replies: 29
    Last Post: 26 Aug 2022, 05:52 AM
  3. v154 Developer Override Email Address [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Dec 2015, 09:56 PM
  4. v154 Email Downloads Support Thread
    By swguy in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 17 Jun 2015, 06:41 PM
  5. PurpleShades Support Thread
    By kobra in forum Addon Templates
    Replies: 122
    Last Post: 18 May 2011, 07:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg