1

i am creating the custom module and i need to send status update email to customer. i am getting the template data but not able able to process the template.

$customemailTemplate  = Mage::getModel('core/email_template')
            ->load($storetemplate);                  

            //$orderdata=$this->object_to_array($order);
            $customemailTemplate->getTemplateFilter();
            $orderarray=array();
  $orderarray['increment_id']=$order->getIncrementId();
  $orderarray['customer_name']=$order->getCustomerName();

$processedTemplate = $customemailTemplate->getProcessedTemplate($orderarray);

echo $processedTemplate;

any hep will be appreciated.

1

You are doing wrong! there is no need to create variable just pass the order data and you are done! so i edit your code sample, so your code will be as follow.

<?php
        $customemailTemplate  = Mage::getModel('core/email_template')
                ->load($storetemplate);                  

                $orderarray=array();
      $orderarray['order']=$order;

    $processedTemplate = $customemailTemplate->getProcessedTemplate($orderarray);
?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.