Magento: Invalid transactional email code: x

If you start seeing this error (both when trying to order) and as emails to the sales address then the error is most likely that someone has deleted the template with id x but that is still set to be used in the database.

The solution for this is to update “System-Configuration-Sales Emails” in admin and save existing templates instead of the template that is now removed.

Note: Also it might be good to consider why this happened, is there some (real) problem or was the template file(s) updated and some old database template was removed [perhaps there is an educational need].

7 thoughts on “Magento: Invalid transactional email code: x

  1. @James: Not sure if this is what you are looking for, but:
    Under app/locale/en_US/template/email/ (and app/locale/en_US/template/email/sales) you can find all the default mails that are sent. (I found that very useful when localizing to another language)
    On the magento wiki there is a list of all the variables that can be used by default.

  2. I was trying to figure out which email was which, but I found a post in the forums that helped me out with this solutions:

    =====================================

    “I think I find out what causes this problem. If you delete a transactional email in Admin > System > Transactional Emails while it’s still set for some of your email templates, you will get this error. At least, that’s what I got myself into it.

    My solution is to go through all the email template selection and re-select them. If it used to be using the deleted one, it will say it’s now using the default template from locale but it’s actually still set to use the deleted one. Select something else, save config, then select default and save to make sure it really is reset.

    Hope this helps.”

    =====================================

    So what I did was create a dummy transactional email, and changed all of the “default locals” to the dummy one and saved it. Then I changed them all back to the default local one and saved it again. It fixed my issue.

  3. Great work. I’ve just started my own blog on email marketing and I’m still learning 🙂

  4. thanks very much, i solved my problem now, yes, i need to set sales emails in configuration again because i deleted the old template.

Comments are closed.