Remove “Gift Message for this Order” from Magento emails

In Magento 1.4.1.0 the new gift message facility appears to be missing some relevant lines from the templates to be able to disable the “Gift Message for this Order” area from the email template. Thankfully, its an extremely quick fix. Open up ./app/design/frontend/base/default/template/email/order/items.phtml and wrap the final table with a conditional statement. <?php if(Mage::getStoreConfig(‘sales/gift_messages/allow_items’)): ?> <table> … </table> <?php endif; ?> The resulting file will then look something like this <?php $_order = $this->getOrder() ?> <table cellspacing="0" cellpadding="0" border="0" width="100%" style="border:1px solid #bebcb7; background:#f8f7f5;"> <thead> <tr> <th align="left" bgcolor="#d9e5ee" style="padding:3px 9px"><?php echo $this->__(‘Item’) ?></th> <th align="left" bgcolor="#d9e5ee" style="padding:3px 9px"><?php echo $this->__(‘Sku’) ?></th> <th align="center" bgcolor="#d9e5ee" style="padding:3px 9px"><?php echo $this->__(‘Qty’) ?></th> <th align="right" bgcolor="#d9e5ee" style="padding:3px 9px"><?php echo $this->__(‘Subtotal’) ?></th> </tr> </thead> <?php $i=0; foreach ($_order->getAllItems() as $_item): ?> <?php if($_item->getParentItem()) continue; else $i++; ?> <tbody<?php echo $i%2 ? ‘ bgcolor="#eeeded"’ : ” ?>> <?php echo $this->getItemHtml($_item) ?> </tbody> <?php endforeach; ?> … Continue reading