1

I can't find where Magento keeps template which generates sales items in the sale emails. I need to change the colour bar on where it holds Item, Sku, Qty, Subtotal

enter image description here

I go to app/design/frontend/yourpackage/yourTemplate/layout/ and open sales.xml, still can't find any hint of it.

Any ideas?

EDIT:

app/design/frontend/{package}/{theme}/template/email/order/items.phtml

<?php  $_order = $this->getOrder() ?>
<table class="data-table" id="my-orders-table" summary="<?php echo $this->__('Items Ordered') ?>">
    <col />
    <col width="1" />
    <col width="1" />
    <col width="1" />
    <col width="1" />
    <thead>
        <tr>
            <th><?php echo $this->__('Product Name') ?></th>
            <th><?php echo $this->__('SKU') ?></th>
            <th class="a-right"><?php echo $this->__('Price') ?></th>
            <th class="a-center"><?php echo $this->__('Qty') ?></th>
            <th class="a-right"><?php echo $this->__('Subtotal') ?></th>
        </tr>
    </thead>
    <tfoot>
        <?php echo $this->getChildHtml('order_totals') ?>
    </tfoot>
        <?php $_items = $_order->getItemsCollection(); ?>
        <?php $_index = 0; ?>
            <?php $_count = $_items->count(); ?>
        <?php foreach ($_items as $_item): ?>
        <?php if ($_item->getParentItem()) continue; ?>
        <tbody>
            <?php echo $this->getItemHtml($_item) ?>
            <?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?>
            <tr class="border<?php echo ($_index++ > $_count ?' last':'') ?>" id="order-item-gift-message-<?php echo $_item->getId() ?>" style="display:none;">
                <?php $_giftMessage=$this->helper('giftmessage/message')->getGiftMessageForEntity($_item); ?>
                <td class="gift-message-row" colspan="7">
                    <a href="#" title="<?php echo $this->__('Close') ?>" onclick="return giftMessageToogle('<?php echo $_item->getId() ?>');" class="btn-close"><?php echo $this->__('Close') ?></a>
                    <dl class="gift-message">
                        <dt><strong><?php echo $this->__('From:') ?></strong> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?></dt>
                        <dt><strong><?php echo $this->__('To:') ?></strong> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?></dt>
                        <dd><?php echo $this->helper('giftmessage/message')->getEscapedGiftMessage($_item) ?></dd>
                    </dl>
                </td>
            </tr>
            <?php endif ?>
        </tbody>
        <?php endforeach; ?>
</table>
<script type="text/javascript">decorateTable('my-orders-table', {'tbody' : ['odd', 'even'], 'tbody tr' : ['first', 'last']})</script>

1 Answer 1

1

The file is app/design/frontend/{package}/{theme}/template/email/order/items.phtml.
You need to edit the <thead> section.

3
  • I found it. But why it has no style of colour in <thead> but I get the grey colour in my email? Please see my edit above.
    – Run
    Commented Jun 29, 2014 at 11:33
  • Also, it says Product Name but it is Item in my email.
    – Run
    Commented Jun 29, 2014 at 11:35
  • Oh I got it. I was looking at the wrong file! Thanks!#
    – Run
    Commented Jun 29, 2014 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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