Jump to content

[Solved] Need a quick bit of help: About email logo


Recommended Posts

Hi,

I've done this before but lost my shop last week because of a failed svn upgrade.

Been working all week on a replacement shop and finally finished it today! My shop is live now and I need to change the email shop logo to my smaller version. It's a different size from the stand logo.

What file is the email logo code in?

Thanks!

Link to comment
Share on other sites

eddieuk,

What did you change to resolve this?


Haha, spent the last 10mins trying to work it out for you!

Every time I fix this I immediately forget how!

You have to edit the mail.php file in the classes directory.

/* Create mail and attach differents parts */
           $message = new Swift_Message('['.Configuration::get('PS_SHOP_NAME').'] '.((is_array($_LANGMAIL) AND key_exists($subject, $_LANGMAIL)) ? $_LANGMAIL[$subject] : $subject));
           $templateVars['{shop_logo}'] = (file_exists(_PS_IMG_DIR_.'*EDIT_THIS*logo.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.'*EDIT_THIS*.jpg'))) : '';
           $templateVars['{shop_name}'] = htmlentities(Configuration::get('PS_SHOP_NAME'), NULL, 'utf-8');
           $templateVars['{shop_url}'] = 'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__;
           $swift->attachPlugin(new Swift_Plugin_Decorator(array($to_plugin => $templateVars)), 'decorator');
           if ($configuration['PS_MAIL_TYPE'] == 3 OR $configuration['PS_MAIL_TYPE'] == 2)
               $message->attach(new Swift_Message_Part($templateTxt, 'text/plain', '8bit', 'utf-8'));
           if ($configuration['PS_MAIL_TYPE'] == 3 OR $configuration['PS_MAIL_TYPE'] == 1)
               $message->attach(new Swift_Message_Part($templateHtml, 'text/html', '8bit', 'utf-8'));
           if ($fileAttachment AND isset($fileAttachment['content']) AND isset($fileAttachment['name']) AND isset($fileAttachment['mime']))
               $message->attach(new Swift_Message_Attachment($fileAttachment['content'], $fileAttachment['name'], $fileAttachment['mime']));



I have included an *EDIT_THIS for the bit you need to edit.

Hope this helps!

Link to comment
Share on other sites

×
×
  • Create New...