Jump to content

changing shop logo in emails


bartman
 Share

Recommended Posts

due to the site design the store logo looks quite nasty in the email templates

what i want to do is use a different logo in the email templates

having a dig round looking for {shop_logo}

i think it is defined in classes/Mail.php

by the following code

$templateVars['{shop_logo}'] = (file_exists(_PS_IMG_DIR_.'logo.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.'logo.jpg'))) : '';



now which would be the better practice

just to supply a different file name and upload a new image so the code looks like this

$templateVars['{shop_logo}'] = (file_exists(_PS_IMG_DIR_.'logoemail.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.'logoemail.jpg'))) : '';



Or define a whole new varible, upload a new file and edit every mail template

as follows

$templateVars['{shop_logoemail}'] = (file_exists(_PS_IMG_DIR_.'logoemail.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.'logoemail.jpg'))) : '';



The first option is quickest and easist but will it have any knock on effects anywhere else

Share this post


Link to post
Share on other sites

I think it would be better to leave the variable the same and just change the filename. That way, you only have to make one change and don't have to edit the mail templates.

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More