Pages

Wednesday, May 9, 2012

Replace default email logo in welcome email Magento

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 you maintain, you uploaded your own version of the e-mail logo image in
/skin/frontend/{package}/{my-theme-name}/images/logo_email.gif
and in the Administration panel, you went to System > Configuration > Design > Themes and set Default to {your-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}/{your-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!

No comments:

Post a Comment