Outlook Order E-mail Has Totals On Top

July 8th, 2010 by janus

In Magento 1.4.x the standard templates for order emails specify totals in a table using the tfoot tag. Unfortunately the HTML renderer in Outlook (at least in 2007) does not put the contents of tfoot at the bottom of the table – and hence your emails will look as if the totals are before the order items.

This can easily be fixed by reordering the tfoot and tbody elements in default/template/email/order/items.phtml.

Note however that this breaks the HTML4 specification that states that the tfoot element must appear before tbody.

Inluding blocks in Magento CMS pages

March 4th, 2010 by janus

Including output from blocks is easily done using the following directive

{{block type="module/block_name" method="outputFunction"}}

You can pass it additional parameters by adding these to the directive using the same syntax as the type and method parameters. These extra parameters will make up the block’s data contents. The method parameter is optional defaults to toHtml.

Including a CMS block can be done by

{{block id="block_id"}}

All of this is (surprisingly) implemented in the Mage_Core_Model_Email_Template_Filter class. There are a number of other directives including layout, skin, media, store, htmlescape, var, protocol, config and customvar.