2

I have multiple stores and want to change Store Logo in Email templates specific to the store.

2

After spending a day, I found a simple way to use store specific logo URL in your custom email templates.

Step1: First You need to create a logo.phtml file in

app/code/<namespace>/<theme>/view/frontend/templates/

Include below single line code in your logo.phtml file, this will return store logo source URL

<?php /* @escapeNotVerified */ echo $block->getLogoSrc() ?>

Step2: Now you can use below code directly into your custom email template file:

<img src="{{block class='Magento\\Theme\\Block\\Html\\Header\\Logo' template='<namespace>_<theme>::logo.phtml'}}" alt="Store Specific Logo" />
|improve this answer|||||
1

Go to below setting

Content > Design > Configuration

Edit the store view you want to edit store logo for from the grid.

You will find the last option Transactional Emails where you can upload your logo for each store views.

enter image description here

|improve this answer|||||
  • Thanks, that I have tried but successfully loaded image but in email templates, it is using default Magento image. – NISHANK KUMAR Aug 19 '17 at 9:35
0

You can change logo as per store in email template

Admin >> Content >> Design >> Configuration >> Edit (Specific Store) >> Transaction Email.

Store specific uploaded logo will display as per store email template.

|improve this answer|||||
  • Thanks, We have this option but it's not working. If we have store logo then why we need to include another logo for email logo. – NISHANK KUMAR Aug 19 '17 at 9:34
0

Just put a code like this in you code template

<img src="{{view url='Magento_Email/logo.png'}}" alt="{{trans 'your alt'}}" width="xxx" height="yyy" />

and put you image in

app/design/frontend/VendorName/theme-name/Magento_Email/web/logo.png

You can put your image in the frontend module relative to the image you want to keep modularity ;)

In BO :

Marketing > email templates > add a template > select the template you want > load it > edit the code, set-up it and save it
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.