magento:smtpplus:template

Adding the SmtpPlus Blocks to your Templates

Most of the SmtpPlus Blocks are added automatically to your Frontend or Administrator pages. Some require manual modification of your Templates as described here:

SmtpPlus is adding template files, that may get customized, in the following locations:

  • For the Store Frontend: app/design/frontend/default/default/template/smtpplus
  • For the Store Administrator: app/design/adminhtml/default/default/template/smtpplus



SmtpPlus has its layout configuration files, that may get customized, in the following locations:

  • For the Store Frontend: app/design/frontend/default/default/layout/smtpplus.xml
  • For the Store Administrator: app/design/adminhtml/default/default/layout/smtpplus.xml



SmtpPlus delivers with language files for English (en_US) and German (de_DE). The language files are located in:

SmtpPlus Translation Files

locale/en_US/Pisc_SmtpPlus.csv
locale/de_DE/Pisc_SmtpPlus.csv



To customize the default Messages, you may put the language file entries to be customized into the customized language file of your Frontend Template:

Customized Translations for your Template

app/design/frontend/default/<your-template>/locale/en_US/translate.csv
app/design/frontend/default/<your-template>/locale/de_DE/translate.csv



SmtpPlus allows to Send a New Email Message from the Customer Account in Administrator. That function is using a Email Template, which is to be created first (and customized if you wish to) before first use of SmtpPlus.

Add a new Template based on the default Template “New Email Message” that comes delivered with SmtpPlus to your Transactional Emails:

System » Transactional Emails » Add new Template



Use Load Template to load the default template, edit or customize it to your requirements and then use Save Template to save it to your collection of Transactional Emails:



After having saved this new Transactional Email, select it as the Template for New Email Message in the Configuration Settings of SmtpPlus.

SmtpPlus is adding the following Template Variables that may get used in the Email Templates for the New Email Message:

{{var message.subject}} ... The Subject of the New Email Message.
{{var message.content}} ... The Content of the New Email Message.


You may also see the default template code for the New Email Message below for the use of these variables:

Default Template for New Email Message

<!--@subject {{var message.subject}} @-->
 
<style type="text/css">
body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
</style>
 
<div style="font:11px/1.35em Verdana, Arial, Helvetica, sans-serif;">
    <table cellspacing="0" cellpadding="0" border="0" width="98%" style="margin-top:10px; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; margin-bottom:10px;">
        <tr>
            <td align="center" valign="top">
                <!-- [ header starts here] -->
                <table cellspacing="0" cellpadding="0" border="0" width="650">
                    <tr>
                        <td valign="top">
                            <a href="{{store url=""}}"><img src="{{skin url="images/logo_email.gif" _area='frontend'}}" alt="Magento"  style="margin-bottom:10px;" border="0"/></a></td>
                    </tr>
                </table>
 
                <!-- [ middle starts here] -->
                <table cellspacing="0" cellpadding="0" border="0" width="650">
                    <tr>
                        <td valign="top">
                            <p><strong>Dear {{htmlescape var=$customer.name}}</strong><br/>
 
                            <div style="border:1px solid #BEBCB7; padding:13px 18px; background:#F8F7F5;">
                            {{var message.content}}
                            </div>
 
                            <p>If you have any questions about your account or any other matter, please feel free to contact us at <a href="mailto:magento@varien.com" style="color:#1E7EC8;">dummyemail@magentocommerce.com</a> or by phone at (555) 555-0123.</p>
                            <p>Thanks again!</p>
 
                        </td>
                    </tr>
                </table>
 
            </td>
        </tr>
    </table>
</div>



SmtpPlus delivers with a Block showing the 5 recent messages sent to a Customers Email Address from your Store, that may get used in the My Account Dashboard of your Store:



To add this Block to the page of your My Account Dashboard, use the following in the respective Frontend Template file template/customer/account/dashboard.phtml:

Block Code for "Recent Messages"

<?php echo $this->getChildHtml('messages') ?>


app/design/frontend/.../template/customer/account/dashboard.phtml

<div class="padder">
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<?php echo $this->getChildHtml('hello') ?>
<?php echo $this->getChildHtml('messages') ?>
<?php echo $this->getChildHtml('top') ?>
<br/>



For sending a New Email Message from the Customer Account in the Administrator (see also here), you may add a WYSIWYG Editor for the Message Content field:


This has been tested with Fontis-WYSIWYG Editor release 1.1.1, you may need to upgrade your editor installation to this version. CKEditor is currently showing difficulties, please use TinyMCE or FCKeditor as selected Editor in your Fontis-WYSIWYG configuration.


The Fontis Wysiwyg Editor itself does not detect Ajax Updates to the Administrator Pages, consequently will not be able to add the Editor to the textareas of SmtpPlus. To overcome this, modify the Fontis-Wysiwyg Layout file to use a modified version of the JavaScripts loading the Editor areas:

app/design/adminhtml/default/default/layout/fontis_wysiwyg.xml

<default>
    <reference name="js">
        <block type="adminhtml/template" name="wysiwyg" template="smtpplus/wysiwyg/fontis.phtml" />
    </reference>
</default>



SmptPlus itself is adding a Event Trigger to update the textareas with the Wysiwyg Editors upon Ajax Updates, for the Message Content textarea to receive a Wysiwyg-Editor add the following CSS-ID to the Fontis-Wysiwyg configuration:

System » Configuration » WYSIWYG Editors » General Settings


Use “Add Textarea CSS ID” to add the following CSS ID:

smtpplus_message_content



With this modifications New Email Message will now have a WYSIWYG-Editor: