magento invalid transactional email code
email, magento, php, transactional
Solution
References to the email templates are stored in the `core_config_data` table; these are id's that correspond to the `template_id` column of the `core_email_template` table. So when removing an entry from the `core_email_template` table, all references to it in the `core_config_data` tabel also need to be removed.
Assuming the `order_new` template is coupled to the `core_config_data` path `Mage_Sales_Model_Order::XML_PATH_EMAIL_TEMPLATE` (i.e. `sales/email/order/template`), the following line in an install script does the trick:
$installer->deleteConfigData(Mage_Sales_Model_Order::XML_PATH_EMAIL_TEMPLATE);
BTW It is also possible to reset the email template references via the admin system configuration by opening the corresponding tab and then saving that tab (without making any changes). For the order email templates, this is the `Sales Emails` tab.
Problem
I did some research about this problem I'm having: I deleted a transitional email template, and now I am getting this error over and over: ``` Invalid transactional email code: 4 ``` Yeah, I know, the '4' is the ID of the template. I made a dummy template, and changed the ID in the database to 4, but I don't want that dummy. Is there anybody who is able to tell me how to fix this problem? Maybe a little reset for transactional emails? Thanx in advance