Jump to content

PS Mail Templates (out of the box)


PrestaHeroes USA

Recommended Posts

Typically I avoid modules that have customer content.  (read systems programmer)

 

How do you all handle emails from your modules as it concerns color?

 

If I copy an email from native mails it has hard coded colors for example...a rather nice pinking color but I prefer to use some sort of css inherit that better suits the shop module is loaded in.

 

...what the heck?  jajajaja

 

any suggestions, guidance or other tough luck stories about ps email 'templates'?

 

I'd love to hear a 'oh you mised this!' pointer.

 

el

 

 

Link to comment
Share on other sites

FYI: many mail readers, gmail included, ignore CSS instructions, either in the header or by remote link. That's why the advised way of sending colored email is by hard-coding the properties or the styling in the html tag itself. Ofcourse this doesn't rule out using variables to configure the styling.

  • Like 1
Link to comment
Share on other sites

FYI: many mail readers, gmail included, ignore CSS instructions, either in the header or by remote link. That's why the advised way of sending colored email is by hard-coding the properties or the styling in the html tag itself. Ofcourse this doesn't rule out using variables to configure the styling.

 

Hi AppleEater, thanks for the information. :)

 

For me, when I include front office content (back office as well) with a module I inherit the themes css.  Emails well I don't have anyway to know what the colors  should be used.  And I don't really see a way around it.

 

Again, thanks.

Link to comment
Share on other sites

Hi El Patron,

In Preferences->Themes -> Mail color , you can define the background color of the mail headers.

This can be used to control the objects highlight colors in the mail HTML templates, as in the example:

<tr>
<td align="left">Hi <strong style="color: {color};">{firstname} {lastname}</strong>,</td>
</tr>
Link to comment
Share on other sites

 

Hi El Patron,

In Preferences->Themes -> Mail color , you can define the background color of the mail headers.

This can be used to control the objects highlight colors in the mail HTML templates, as in the example:

<tr>
<td align="left">Hi <strong style="color: {color};">{firstname} {lastname}</strong>,</td>
</tr>

 

Hi thanks again for info.  What I would like to accomplish is when customer loads a module with mail templates that I match the customers shop without them having to modify the mail that is included with module.

Link to comment
Share on other sites

I think that for that you'll have to create a set the colors configurations in the mail.php file, like this line:

$template_vars['{color}'] = Tools::safeOutput(Configuration::get('PS_MAIL_COLOR', null, null, $id_shop));

All other color are specified in the CSS files of the template, so either you hard code the same colors from the template global.css into the mail template or the mail.php class, or create an module Admin UI where the shop admin defines the mail colors, and you set them in the mail.php, and call them in the mail template.

Link to comment
Share on other sites

I think that for that you'll have to create a set the colors configurations in the mail.php file, like this line:

$template_vars['{color}'] = Tools::safeOutput(Configuration::get('PS_MAIL_COLOR', null, null, $id_shop));

All other color are specified in the CSS files of the template, so either you hard code the same colors from the template global.css into the mail template or the mail.php class, or create an module Admin UI where the shop admin defines the mail colors, and you set them in the mail.php, and call them in the mail template.

 

I am going to try this and will report back my results. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...