I don't want to create templates for all transactional emails but I would like to replace the default Magento logo used for emails.
I know that I can go into the base directory and replace it, but if I upgrade the system it will wipe it out. Does anyone know the proper way to change it?
Change Email Logo in Magento 2.1 or above On the workplace, please scroll down to Other Settings, open Transactional Email setion, To change your Logo Email, click on Upload to choose one of the image files you want to aplly for your logo. Enter the alternate text identify the Logo Image Alt .
Transactional email generally uses an API or SMTP integration to send emails. This usually requires a developer to set up a system that will send coded templates to specific recipients based on a specific action. In Mailchimp, however, you can quickly create transactional emails like you would any email campaign.
Another correct way to do that is to go in BackEnd to System>>Configuration>>Design>>Transactional Emails>>Logo Image and easily pick your logo image from there. GL.
You can create a new theme and place it there. This isn't as difficult as it sounds because of the way themes fall back onto defaults in Magento. If Magento can't find something in your theme, it will fall back onto the base theme by looking in the default
folder.
For example, in a store that I maintain, I uploaded my own version of the e-mail logo image in
/skin/frontend/{package}/{my-theme-name}/images/logo_email.gif
and in the Administration panel, I went to System > Configuration > Design > Themes and set Default
to {my-theme-name}
.
Why does this work?
In the e-mail templates, Magento specifies the src
of the logo image as {{skin url="images/logo_email.gif" _area='frontend'}}
. This is Magento template gibberish for "find the images/logo_email.gif
in the frontend
area of the current theme." So Magento looks in for /frontend/{package}/{my-theme-name}/images/logo_email.gif
, finds it, and uses that path when dishing out the HTML.
If you delete your image, it doesn't break! Instead, although Magento would still first search in your theme directory as described above, it would discover that it doesn't exist and fall back onto the one in /frontend/{package}/default/images/logo_email.gif
.
Good luck, and hope this helps!
The best answer for handling logos in transactional emails is a combination of the previous answers.
Select the logo for your transactional emails by going here: System -> Configuration -> Design -> Transactional Emails -> Logo Image
Then, in your transactional emails ensure that they reference: {{var logo_url}}
for the url of the logo.
I upgraded from an older version of Magento and it had {{skin url="images/logo_email.gif" _area='frontend'}}
for the logo url. This older method referenced the logo_email.gif stuck in the default image folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With