I want edit sendNewOrderEmail() function from Mage_Sales_Model_Order class . I want achieve following task as,
1. Need to set different template for new order email on the basis of product type.
EX . If product type is downloadable need to send downloadbale template.
If product is simple need to send simple email template for logged in users.
How Do I achieve?
Any Help... Thanks in advance....
Solved! Go to Solution.
To send different order confirmation email depending on specific criteria you would either have to :
{{block type='core/template' area='frontend' template='sales/custom_logic.phtml' order=$order}}
In custom_logic.phtml
<?php $order = $this->getOrder() if($order->getCustomerGroupId() == 1){ ///do ....
To send different order confirmation email depending on specific criteria you would either have to :
{{block type='core/template' area='frontend' template='sales/custom_logic.phtml' order=$order}}
In custom_logic.phtml
<?php $order = $this->getOrder() if($order->getCustomerGroupId() == 1){ ///do ....