Google+

Pages

Friday, June 22, 2012

Magento: Transactional Email Template Preview Showing HTML code

In some magento installations(like: Magento 1.6.1, Magento 1.6.2 etc), when we try to see preview of any transactional email template, it shows html only.
 To fix this problem, here is an easy fix :
Go to:
  app/code/core/Mage/Adminhtml/Block/System/Email/Template
and copy preview.php, and override it in your local folder.
Find:
$template->setTemplateText(
$this->escapeHtml($template->getTemplateText())

);

and comment out these three lines, like below:

//$template->setTemplateText(
//$this->escapeHtml($template->getTemplateText())
//);

That's all..
Now clear your Magento's Cache and enjoy.. :)

No comments: