Magento is an excellent eCommerce platform, but nothing in this world is perfect. We want to do our part and provide the open-source community with a module that will deal with that oh-so-common email template customisation.
Most of the larger Magento projects will require some sort of customisation for email templates.
By default your only options are:
- Modify the template files directly
- Create new transactional email record in database using install script within a module
The Problem with Magento Email Customisation
Both are bad however, the first means we are editing core files which is a “no-no” for a standards obeying Magento programmer. Second doesn’t seem bad at first, but as soon as you are making changes to more than few email templates you realise how mind numbingly boring, slow and error prone operations you are doing. Enterprise version has more than 50 email templates! And things get even worse if you have multiple stores which require differences in email templates.
Module for Magento Email customisation
So to make my or someone else future life easier I made a tiny module with two core method overrides that enables you to simply copy paste the template file into themes locale folder with the same name and folder structure as in app/etc/locale/template.
It uses same fallback system as Magento themes so you can also have different email templates per store easily.
Example, if you wan’t to customise order email which location is app/locale/en_US/template/email/sales/order_new.html
just copy it to app/design/frontend/mypackage/mytheme/locale/en_US/template/email/sales/order_new.html and you are done!
Module source can be found here. Hope it will save some poor programmer soul a few hours!:)
Still struggling with Magento? Need help from professionals? Scandiweb is the most certified Magento agency in the world with more than a hundred experienced coders and more than a decade of experience under its belt. We’re here to help, so if you have any questions – drop us a line at [email protected] or check out our B2B services page.
Share on: