bartman Posted June 2, 2010 Share Posted June 2, 2010 due to the site design the store logo looks quite nasty in the email templateswhat i want to do is use a different logo in the email templateshaving a dig round looking for {shop_logo}i think it is defined in classes/Mail.phpby 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 practicejust 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 templateas 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 Link to comment Share on other sites More sharing options...
rocky Posted June 3, 2010 Share Posted June 3, 2010 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. Link to comment Share on other sites More sharing options...
bartman Posted June 3, 2010 Author Share Posted June 3, 2010 will do,many thanks chris Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now