I have two 'special' products that when ordered should send a custom email (in place of the standard order confirmation email).
An Observer is set up for the sales_order_place_after
event but not sure how to change the email template for the order.
How do I change the email template for this particular order.
Best Answer
To send different order conformation email depending on specific criteria you would either have to :
Rewrite
sendNewOrderEmail()
in Mage_Sales_Model_Order and add logic to check the templateDisable magento "order confirmation email" in system config, then create a custom module to send your email by coping logic from sendNewOrderEmail() using event/observer
For simple text changes, you could use template logic
{{if order.customer_group_id}}
or{{depend order.customer_group_id}}
but they seem to only evaluate true/false condition, therefore for more advance logic you could include a blockIn custom_logic.phtml
See Magento Email Template If Statements